Skip to content

Latest commit

 

History

History
205 lines (145 loc) · 8.33 KB

CHANGELOG-2.0.md

File metadata and controls

205 lines (145 loc) · 8.33 KB

Changes into Jelix 2.0

  • minimum PHP version is 8.1.0

  • Many Jelix classes are now under a namespace, but some classes with old names still exist to ease the transition, although it is recommended to use new name as these old classes are deprecated.

  • jApp::coord() is replaced by \Jelix\Core\App::router()

  • The charset configuration property is deprecated. Everything in Jelix works with the UTF-8 charset from now. Locales must be only in UTF-8.

  • new var/build directory used to store files generated by the installer.

  • Some files are not compiled anymore on the fly, but only during installation. It avoids to launch compilers during an http request, to improve performance. During the development, you can set a file watcher (into your IDE for example) that will call php dev.php compile $FULLPATH_OF_FILE, to compile a single file without calling the installer before each test into your browser. Files that are compiled during installers:

    • configuration files
    • locales files (properties files)
    • events files (events.xml)
  • configuration parameter to activate modules are moved from the main configuration to framework.ini.php.

  • project.xml can be replaced by a json file named jelix-app.json

  • module.xml can be replaced by a json file named jelix-module.json

  • module.xml: 'creator' and 'contributor' elements changed to 'author'

  • module.xml: 'minversion' and 'maxversion' are changed to 'version' Same syntax in this new attribute as in composer.json

  • Remove support of infoIDSuffix from jelix-scripts.ini files

  • Functions declared into the namespace Jelix\Utilities are now into the namespace Jelix\Core\Utilities

  • the script runtests.php and the unit test mechanism for modules (tests inside modules) are now gone. See upgrade instructions.

  • the modules jacl and jacldb are not provided anymore. Use jacl2 and jacl2db instead.

  • remove support of the deprecated command line scripts system of Jelix <=1.6. Only Symphony console scripts are supported from now.

  • remove the deprecated jforms builder based on jFormsBuilderBase and jFormsBuilderHtml and so, builders named legacy.html or legacy.htmllight

  • remove binding feature from jClasses

Changes in jDb

jDb is now relying on JelixDatabase. The jDb class is still existing, but most of internal classes of jDb are gone and replaced by classes of JelixDatabase:

  • jDbConnection and jDbPDOConnection are replaced by objects implementing Jelix\Database\ConnectionInterface
  • jDbResultSet and jDbPDOResultSet are replaced by objects implementing Jelix\Database\ResultSetInterface
  • jDbParameters is deprecated and replaced by \Jelix\Database\AccessParameters
  • jDbTools is replaced by objects implementing Jelix\Database\Schema\SqlToolsInterface
  • jDbSchema is replaced by objects implementing Jelix\Database\Schema\SchemaInterface
  • jDbIndex, jDbConstraint, jDbUniqueKey, jDbPrimaryKey, jDbReference, jDbColumn, jDbTable are replaced by some classes of the Jelix\Database\Schema\ namespace.
  • jDbUtils::getTools() is deprecated and is replaced by \Jelix\Database\Connection::getTools()
  • jDbWidget is deprecated and replaced by Jelix\Database\Helpers
  • jDaoDbMapper::createTableFromDao() returns an object \Jelix\Database\Schema\TableInterface instead of jTable

Plugins for jDb (aka "drivers"), implementing connectors etc, are not supported anymore.

All error messages are now only in english. No more jelix~db.* locales.

Changes in jDao

jDao is now relying on JelixDao. The jDao class is still the main class to use to load and use Dao. Some internal classes are gone.

  • jDaoFactoryBase is replaced by objects implementing Jelix\Dao\DaoFactoryInterface
  • jDaoRecordBase is replaced by objects implementing Jelix\Dao\DaoRecordInterface
  • jDaoGenerator and jDaoParser are removed
  • jDaoMethod is replaced by Jelix\Dao\Parser\DaoMethod
  • jDaoProperty is replaced by Jelix\Dao\Parser\DaoProperty
  • jDaoConditions and jDaoCondition are deprecated and replaced by \Jelix\Dao\DaoConditions and \Jelix\Dao\DaoCondition.
  • jDaoXmlException is deprecated. The parser generates Jelix\Dao\Parser\ParserException instead.

New classes:

  • jDaoContext
  • jDaoHooks

Plugins for jDaoCompiler (type 'daobuilder'), are not supported anymore.

All error messages are now only in english. No more jelix~daoxml.* and jelix~dao.* locales.

Changes in jForms

All jForms* classes and jIForms* interfaces are deprecated, and you should use corresponding classes and interfaces from the \Jelix\Forms\ namespace.

Interfaces jIFormsDatasource and jIFormsDatasource2 have been merged into a new interface \Jelix\Forms\Datasource\DatasourceInterface, having no more getLabel2() method, and having a getLabel() changed method.

Also :

  • jExceptionForms is deprecated, you should catch \Jelix\Forms\FormException instead
  • the ref attribute on control objects is now readonly

Changes in jEvent

  • Declaration of event listener can now be done into the listener class with PHP attributes In this case, the listener class can be any classes, not only classes inheriting from \Jelix\Event\EventListener. However the listener class should be still declared into the event.xml files.
<events xmlns="http://jelix.org/ns/events/1.0">
   <listener name="\JelixTests\Tests\Listener\TestAttrEventsListener"/>
</events>
class TestAttrEventsListener
{
    #[ListenEvent('TestEvent')]
    function onTestEvent ($event) { }

    #[ListenEventClass]
    function testEventObject(EventForTest $event) { }
}

Test environment

  • upgrade PHPUnit to 10.4.0

Internal

Deprecated

  • App::initPaths() and jApp::initPaths(): the $scriptPath parameter is deprecated and not used anymore
  • \Jelix\Installer\EntryPoint::isCliScript() (it returns always false from now)
  • constant JELIX_SCRIPTS_PATH. Its value is now <vendor path>/lib/Jelix/DevHelper/.
  • jConfigCompiler::findServerName() has been moved to Jelix\Core\Server::findServerName()

removed classes and methods

  • jJsonRpc
  • JelixTestSuite, junittestcase, junittestcasedb
  • jAuth::reloadUser()
  • App::appConfigPath(), App::configPath()
  • jHttpResponseException
  • jResponseHtml::$_CSSIELink jResponseHtml::$_JSIELink jResponseHtml::getJSIELinks jResponseHtml::setJSIELinks jResponseHtml::getCSSIELinks jResponseHtml::setCSSIELinks
  • jResponseStreamed
  • jEvent::clearCache(), Jelix\Event\Event::clearCache()
  • jFormsDaoDatasource::getDependentControls()
  • jFormsControlCaptcha::$question, jFormsControlCaptcha::initExpectedValue()
  • Jelix\Forms\HtmlWidget\RootWidget::$builder
  • jFile::getMimeType(), jFile::shortestPath(), jFile::normalizePath()
  • jIniFile, jIniFileModifier, jIniMultiFilesModifier
  • jClassBinding, jClasses::createBinded(), jClasses::getBindedService(), jClasses::bind(), jClasses::resetBindings()

Internal classes and methods, you did not supposed to use, except for complex plugins:

  • jIUrlSignificantHandler
  • jEventCompiler
  • jFormsCompiler, jFormsCompiler_jf_1_1, jFormsCompiler_jf_1_0
  • jFormsBuilderBase, jFormsBuilderHtml, htmlJformsBuilder, htmllightJformsBuilder
  • remove parameter $installWholeApp from the Jelix\Installer\Module\InstallerAbstract constructor.

From the command line scripts system of Jelix <=1.6:

  • jApp::scriptsPath(), App::scriptsPath(), AppInstance::$scriptsPath,
  • jControllerCmdLine, jCmdLineRequest, jResponseCmdline, jCmdlineCoordinator, jCmdUtils
  • Jelix\DevHelper\CommandConfig::$layoutScriptsPath

Removed modules

  • jacl and jacldb. Use jacl2 and jacl2db instead.

Removed plugins

  • kvdb: file2

Other removes:

  • lib/jelix-scripts. Its DevHelper classes and templates have been moved to lib/Jelix

  • lib/jelix-scripts/includes/cmd.inc.php and lib/jelix-scripts/includes/scripts.inc.php

  • lib/jelix/forms/jFormsDatasource.class.php _ j_jquerypath variable in templates

  • parameter indicating the component to load into the template meta tag {meta_html jquery_ui}

  • remove support of configuration parameters

    • enableAllModules
    • disableInstallers
    • loadClasses from the sessions section
    • jqueryPath from the urlengine section.
    • enableParser from the urlengine section.