From 21ca25b8763ee598a46c18456ed93b6366134adf Mon Sep 17 00:00:00 2001 From: Ioannis Igoumenos Date: Sun, 19 Sep 2021 17:05:27 +0300 Subject: [PATCH 1/2] Upgraded to CAKEPHP version 3.10 (#5, CO-2213) Co-authored-by: Ioannis Igoumenos --- app/composer.json | 2 +- app/composer.lock | 1958 +++-- app/vendor/adodb/adodb-php/.gitattributes | 17 - app/vendor/adodb/adodb-php/.gitignore | 10 - app/vendor/adodb/adodb-php/.mailmap | 4 - app/vendor/adodb/adodb-php/LICENSE.md | 11 +- app/vendor/adodb/adodb-php/README.md | 53 +- .../adodb-php/adodb-active-record.inc.php | 212 +- .../adodb-php/adodb-active-recordx.inc.php | 90 +- .../adodb/adodb-php/adodb-csvlib.inc.php | 48 +- .../adodb/adodb-php/adodb-datadict.inc.php | 312 +- .../adodb/adodb-php/adodb-error.inc.php | 42 +- .../adodb-php/adodb-errorhandler.inc.php | 25 +- .../adodb/adodb-php/adodb-errorpear.inc.php | 27 +- .../adodb/adodb-php/adodb-exceptions.inc.php | 39 +- .../adodb/adodb-php/adodb-iterator.inc.php | 26 - app/vendor/adodb/adodb-php/adodb-lib.inc.php | 871 ++- .../adodb-php/adodb-loadbalancer.inc.php | 773 ++ .../adodb-php/adodb-memcache.lib.inc.php | 94 +- .../adodb/adodb-php/adodb-pager.inc.php | 44 +- app/vendor/adodb/adodb-php/adodb-pear.inc.php | 31 +- app/vendor/adodb/adodb-php/adodb-perf.inc.php | 78 +- app/vendor/adodb/adodb-php/adodb-php4.inc.php | 16 - app/vendor/adodb/adodb-php/adodb-time.inc.php | 244 +- .../adodb/adodb-php/adodb-xmlschema.inc.php | 48 +- .../adodb/adodb-php/adodb-xmlschema03.inc.php | 259 +- app/vendor/adodb/adodb-php/adodb.inc.php | 1865 +++-- app/vendor/adodb/adodb-php/composer.json | 10 +- .../adodb/adodb-php/contrib/toxmlrpc.inc.php | 181 - .../adodb-php/cute_icons_for_site/adodb.gif | Bin 1091 -> 0 bytes .../adodb-php/cute_icons_for_site/adodb2.gif | Bin 1458 -> 0 bytes .../datadict/datadict-access.inc.php | 29 +- .../adodb-php/datadict/datadict-db2.inc.php | 108 +- .../datadict/datadict-firebird.inc.php | 134 +- .../datadict/datadict-generic.inc.php | 29 +- .../adodb-php/datadict/datadict-ibase.inc.php | 29 +- .../datadict/datadict-informix.inc.php | 29 +- .../adodb-php/datadict/datadict-mssql.inc.php | 33 +- .../datadict/datadict-mssqlnative.inc.php | 180 +- .../adodb-php/datadict/datadict-mysql.inc.php | 34 +- .../adodb-php/datadict/datadict-oci8.inc.php | 97 +- .../datadict/datadict-postgres.inc.php | 285 +- .../adodb-php/datadict/datadict-sapdb.inc.php | 32 +- .../datadict/datadict-sqlite.inc.php | 38 +- .../datadict/datadict-sybase.inc.php | 29 +- app/vendor/adodb/adodb-php/docs/README.md | 4 +- app/vendor/adodb/adodb-php/docs/changelog.md | 965 ++- .../adodb/adodb-php/docs/changelog_v2.x.md | 10 +- .../adodb/adodb-php/docs/changelog_v3.x.md | 8 +- .../adodb/adodb-php/docs/changelog_v4+5.md | 8 +- .../adodb/adodb-php/docs/changelog_v4.x.md | 183 +- .../adodb-php/drivers/adodb-access.inc.php | 57 +- .../adodb/adodb-php/drivers/adodb-ado.inc.php | 46 +- .../adodb-php/drivers/adodb-ado5.inc.php | 46 +- .../drivers/adodb-ado_access.inc.php | 41 +- .../adodb-php/drivers/adodb-ado_mssql.inc.php | 111 +- .../adodb/adodb-php/drivers/adodb-ads.inc.php | 1526 ++-- .../drivers/adodb-borland_ibase.inc.php | 41 +- .../adodb/adodb-php/drivers/adodb-csv.inc.php | 63 +- .../adodb/adodb-php/drivers/adodb-db2.inc.php | 1796 ++++- .../adodb-php/drivers/adodb-db2oci.inc.php | 86 +- .../adodb-php/drivers/adodb-db2ora.inc.php | 43 +- .../adodb-php/drivers/adodb-fbsql.inc.php | 40 +- .../adodb-php/drivers/adodb-firebird.inc.php | 889 ++- .../adodb-php/drivers/adodb-ibase.inc.php | 110 +- .../adodb-php/drivers/adodb-informix.inc.php | 41 +- .../drivers/adodb-informix72.inc.php | 45 +- .../adodb-php/drivers/adodb-ldap.inc.php | 44 +- .../adodb-php/drivers/adodb-mssql.inc.php | 483 +- .../adodb-php/drivers/adodb-mssql_n.inc.php | 123 +- .../drivers/adodb-mssqlnative.inc.php | 845 +- .../adodb-php/drivers/adodb-mssqlpo.inc.php | 46 +- .../adodb-php/drivers/adodb-mysql.inc.php | 235 +- .../adodb-php/drivers/adodb-mysqli.inc.php | 1251 ++- .../adodb-php/drivers/adodb-mysqlpo.inc.php | 56 +- .../adodb-php/drivers/adodb-mysqlt.inc.php | 48 +- .../adodb-php/drivers/adodb-netezza.inc.php | 58 +- .../adodb-php/drivers/adodb-oci8.inc.php | 154 +- .../adodb-php/drivers/adodb-oci805.inc.php | 33 +- .../adodb-php/drivers/adodb-oci8po.inc.php | 152 +- .../drivers/adodb-oci8quercus.inc.php | 47 +- .../adodb-php/drivers/adodb-odbc.inc.php | 162 +- .../adodb-php/drivers/adodb-odbc_db2.inc.php | 119 +- .../drivers/adodb-odbc_mssql.inc.php | 128 +- .../drivers/adodb-odbc_mssql2012.inc.php | 37 + .../drivers/adodb-odbc_oracle.inc.php | 50 +- .../adodb-php/drivers/adodb-odbtp.inc.php | 66 +- .../drivers/adodb-odbtp_unicode.inc.php | 52 +- .../adodb-php/drivers/adodb-oracle.inc.php | 39 +- .../adodb/adodb-php/drivers/adodb-pdo.inc.php | 224 +- .../adodb-php/drivers/adodb-pdo_dblib.inc.php | 190 + .../drivers/adodb-pdo_firebird.inc.php | 452 ++ .../adodb-php/drivers/adodb-pdo_mssql.inc.php | 31 +- .../adodb-php/drivers/adodb-pdo_mysql.inc.php | 147 +- .../adodb-php/drivers/adodb-pdo_oci.inc.php | 40 +- .../adodb-php/drivers/adodb-pdo_pgsql.inc.php | 104 +- .../drivers/adodb-pdo_sqlite.inc.php | 46 +- .../drivers/adodb-pdo_sqlsrv.inc.php | 138 +- .../adodb-php/drivers/adodb-postgres.inc.php | 37 +- .../drivers/adodb-postgres64.inc.php | 273 +- .../adodb-php/drivers/adodb-postgres7.inc.php | 104 +- .../adodb-php/drivers/adodb-postgres8.inc.php | 38 +- .../adodb-php/drivers/adodb-postgres9.inc.php | 30 +- .../adodb-php/drivers/adodb-proxy.inc.php | 53 +- .../adodb-php/drivers/adodb-sapdb.inc.php | 109 +- .../drivers/adodb-sqlanywhere.inc.php | 83 +- .../adodb-php/drivers/adodb-sqlite.inc.php | 106 +- .../adodb-php/drivers/adodb-sqlite3.inc.php | 334 +- .../adodb-php/drivers/adodb-sqlitepo.inc.php | 51 +- .../adodb-php/drivers/adodb-sybase.inc.php | 73 +- .../drivers/adodb-sybase_ase.inc.php | 44 +- .../adodb-php/drivers/adodb-text.inc.php | 102 +- .../adodb/adodb-php/drivers/adodb-vfp.inc.php | 43 +- .../adodb/adodb-php/lang/adodb-ar.inc.php | 22 +- .../adodb/adodb-php/lang/adodb-bg.inc.php | 24 +- .../adodb/adodb-php/lang/adodb-ca.inc.php | 23 +- .../adodb/adodb-php/lang/adodb-cn.inc.php | 23 +- .../adodb/adodb-php/lang/adodb-cz.inc.php | 23 +- .../adodb/adodb-php/lang/adodb-da.inc.php | 22 +- .../adodb/adodb-php/lang/adodb-de.inc.php | 78 +- .../adodb/adodb-php/lang/adodb-en.inc.php | 19 + .../adodb/adodb-php/lang/adodb-eo.inc.php | 22 +- .../adodb/adodb-php/lang/adodb-es.inc.php | 22 +- .../adodb/adodb-php/lang/adodb-fa.inc.php | 22 +- .../adodb/adodb-php/lang/adodb-fr.inc.php | 19 + .../adodb/adodb-php/lang/adodb-hu.inc.php | 23 +- .../adodb/adodb-php/lang/adodb-id.inc.php | 55 + .../adodb/adodb-php/lang/adodb-it.inc.php | 23 +- .../adodb/adodb-php/lang/adodb-nl.inc.php | 22 +- .../adodb/adodb-php/lang/adodb-oc.inc.php | 51 + .../adodb/adodb-php/lang/adodb-pl.inc.php | 22 +- .../adodb/adodb-php/lang/adodb-pt-br.inc.php | 23 +- .../adodb/adodb-php/lang/adodb-ro.inc.php | 22 +- .../adodb/adodb-php/lang/adodb-ru.inc.php | 22 +- .../adodb/adodb-php/lang/adodb-sv.inc.php | 22 +- .../adodb/adodb-php/lang/adodb-th.inc.php | 22 +- .../adodb/adodb-php/lang/adodb-uk.inc.php | 22 +- .../adodb-php/pear/Auth/Container/ADOdb.php | 58 +- .../adodb-php/pear/auth_adodb_example.php | 23 +- .../adodb/adodb-php/perf/perf-db2.inc.php | 33 +- .../adodb-php/perf/perf-informix.inc.php | 35 +- .../adodb/adodb-php/perf/perf-mssql.inc.php | 34 +- .../adodb-php/perf/perf-mssqlnative.inc.php | 34 +- .../adodb/adodb-php/perf/perf-mysql.inc.php | 45 +- .../adodb/adodb-php/perf/perf-oci8.inc.php | 33 +- .../adodb-php/perf/perf-postgres.inc.php | 36 +- app/vendor/adodb/adodb-php/phpdoc | 20 + app/vendor/adodb/adodb-php/pivottable.inc.php | 27 +- .../replicate/adodb-replicate.inc.php | 1181 --- .../adodb-php/replicate/replicate-steps.php | 137 - .../adodb/adodb-php/replicate/test-tnb.php | 421 - app/vendor/adodb/adodb-php/rsfilter.inc.php | 25 +- app/vendor/adodb/adodb-php/scripts/.gitignore | 2 - .../adodb/adodb-php/scripts/TARADO5.BAT | 49 - .../adodb/adodb-php/scripts/buildrelease.py | 270 - .../adodb/adodb-php/scripts/updateversion.py | 399 - .../adodb/adodb-php/scripts/uploadrelease.py | 172 - app/vendor/adodb/adodb-php/server.php | 61 +- .../session/adodb-compress-bzip2.php | 46 +- .../adodb-php/session/adodb-compress-gzip.php | 38 +- .../adodb-php/session/adodb-cryptsession.php | 39 +- .../adodb-php/session/adodb-cryptsession2.php | 39 +- .../session/adodb-encrypt-mcrypt.php | 32 +- .../adodb-php/session/adodb-encrypt-md5.php | 31 +- .../session/adodb-encrypt-secret.php | 39 +- .../adodb-php/session/adodb-encrypt-sha1.php | 24 +- .../adodb/adodb-php/session/adodb-sess.txt | 6 +- .../adodb-php/session/adodb-session-clob.php | 39 +- .../adodb-php/session/adodb-session-clob2.php | 40 +- .../adodb/adodb-php/session/adodb-session.php | 49 +- .../adodb-php/session/adodb-session2.php | 142 +- .../adodb/adodb-php/session/crypt.inc.php | 27 +- .../session/old/adodb-cryptsession.php | 44 +- .../session/old/adodb-session-clob.php | 41 +- .../adodb-php/session/old/adodb-session.php | 44 +- .../adodb/adodb-php/session/old/crypt.inc.php | 26 +- .../adodb-php/session/session_schema.xml | 2 +- .../adodb-php/session/session_schema2.xml | 2 +- .../adodb/adodb-php/tests/benchmark.php | 86 - app/vendor/adodb/adodb-php/tests/client.php | 199 - app/vendor/adodb/adodb-php/tests/pdo.php | 92 - .../adodb-php/tests/test-active-record.php | 140 - .../adodb-php/tests/test-active-recs2.php | 76 - .../adodb-php/tests/test-active-relations.php | 85 - .../tests/test-active-relationsx.php | 418 - .../adodb/adodb-php/tests/test-datadict.php | 251 - .../adodb/adodb-php/tests/test-perf.php | 48 - .../adodb/adodb-php/tests/test-pgblob.php | 86 - .../adodb/adodb-php/tests/test-php5.php | 116 - .../adodb/adodb-php/tests/test-xmlschema.php | 53 - app/vendor/adodb/adodb-php/tests/test.php | 1781 ----- app/vendor/adodb/adodb-php/tests/test2.php | 25 - app/vendor/adodb/adodb-php/tests/test3.php | 44 - app/vendor/adodb/adodb-php/tests/test4.php | 144 - app/vendor/adodb/adodb-php/tests/test5.php | 48 - .../adodb/adodb-php/tests/test_rs_array.php | 46 - .../adodb/adodb-php/tests/testcache.php | 30 - .../adodb-php/tests/testdatabases.inc.php | 478 -- .../adodb/adodb-php/tests/testgenid.php | 35 - .../adodb/adodb-php/tests/testmssql.php | 77 - app/vendor/adodb/adodb-php/tests/testoci8.php | 84 - .../adodb/adodb-php/tests/testoci8cursor.php | 110 - .../adodb/adodb-php/tests/testpaging.php | 87 - app/vendor/adodb/adodb-php/tests/testpear.php | 35 - .../adodb/adodb-php/tests/testsessions.php | 100 - app/vendor/adodb/adodb-php/tests/time.php | 16 - app/vendor/adodb/adodb-php/tests/tmssql.php | 79 - .../adodb/adodb-php/tests/xmlschema-mssql.xml | 34 - .../adodb/adodb-php/tests/xmlschema.xml | 33 - app/vendor/adodb/adodb-php/toexport.inc.php | 28 +- app/vendor/adodb/adodb-php/tohtml.inc.php | 43 +- app/vendor/adodb/adodb-php/xmlschema03.dtd | 36 +- .../.github/workflows/tests.yaml | 47 + .../ajgl/breakpoint-twig-extension/.php_cs | 31 - .../breakpoint-twig-extension/.php_cs.dist | 36 + .../.scrutinizer.yml | 7 - .../breakpoint-twig-extension/.travis.yml | 22 - .../breakpoint-twig-extension/CHANGELOG.md | 35 +- .../ajgl/breakpoint-twig-extension/README.md | 23 +- .../breakpoint-twig-extension/composer.json | 23 +- .../src/BreakpointExtension.php | 24 +- .../tests/BreakpointExtensionTest.php | 11 +- ...glBreakpointTwigExtensionExtensionTest.php | 10 +- .../asm89/twig-cache-extension/.travis.yml | 68 +- .../asm89/twig-cache-extension/composer.json | 6 +- .../Asm89/Twig/CacheExtension/Extension.php | 2 +- .../DoctrineCacheAdapterTest.php | 2 +- .../GenerationCacheStrategyTest.php | 4 +- .../IndexedChainingCacheStrategyTest.php | 2 +- .../LifetimeCacheStrategyTest.php | 2 +- app/vendor/bin/var-dump-server | 1 + app/vendor/cakephp/bake/Dockerfile | 24 + app/vendor/cakephp/bake/LICENSE.txt | 2 +- app/vendor/cakephp/bake/README.md | 2 +- app/vendor/cakephp/bake/composer.json | 30 +- app/vendor/cakephp/bake/docs.Dockerfile | 18 + .../bake/docs/config/__init__.py} | 0 app/vendor/cakephp/bake/docs/config/all.py | 49 + app/vendor/cakephp/bake/docs/en/conf.py | 9 + app/vendor/cakephp/bake/docs/en/contents.rst | 7 + .../cakephp/bake/docs/en/development.rst | 304 + app/vendor/cakephp/bake/docs/en/index.rst | 28 + app/vendor/cakephp/bake/docs/en/usage.rst | 133 + app/vendor/cakephp/bake/docs/es/conf.py | 9 + app/vendor/cakephp/bake/docs/es/contents.rst | 7 + .../cakephp/bake/docs/es/development.rst | 17 + app/vendor/cakephp/bake/docs/es/index.rst | 31 + app/vendor/cakephp/bake/docs/es/usage.rst | 115 + app/vendor/cakephp/bake/docs/fr/conf.py | 9 + app/vendor/cakephp/bake/docs/fr/contents.rst | 7 + .../cakephp/bake/docs/fr/development.rst | 351 + app/vendor/cakephp/bake/docs/fr/index.rst | 26 + app/vendor/cakephp/bake/docs/fr/usage.rst | 108 + app/vendor/cakephp/bake/docs/ja/conf.py | 9 + app/vendor/cakephp/bake/docs/ja/contents.rst | 7 + .../cakephp/bake/docs/ja/development.rst | 301 + app/vendor/cakephp/bake/docs/ja/index.rst | 28 + app/vendor/cakephp/bake/docs/ja/usage.rst | 102 + app/vendor/cakephp/bake/docs/pt/conf.py | 9 + app/vendor/cakephp/bake/docs/pt/contents.rst | 7 + .../cakephp/bake/docs/pt/development.rst | 280 + app/vendor/cakephp/bake/docs/pt/index.rst | 25 + app/vendor/cakephp/bake/docs/pt/usage.rst | 130 + app/vendor/cakephp/bake/docs/ru/conf.py | 9 + app/vendor/cakephp/bake/docs/ru/contents.rst | 7 + .../cakephp/bake/docs/ru/development.rst | 293 + app/vendor/cakephp/bake/docs/ru/index.rst | 24 + app/vendor/cakephp/bake/docs/ru/usage.rst | 131 + app/vendor/cakephp/bake/phpcs.xml.dist | 11 + app/vendor/cakephp/bake/phpstan.neon | 3 +- .../cakephp/bake/src/Shell/BakeShell.php | 21 +- .../cakephp/bake/src/Shell/Task/BakeTask.php | 5 +- .../bake/src/Shell/Task/BakeTemplateTask.php | 6 +- .../cakephp/bake/src/Shell/Task/CellTask.php | 2 +- .../bake/src/Shell/Task/ControllerTask.php | 25 +- .../bake/src/Shell/Task/FixtureTask.php | 22 +- .../cakephp/bake/src/Shell/Task/ModelTask.php | 137 +- .../bake/src/Shell/Task/PluginTask.php | 46 +- .../bake/src/Shell/Task/SimpleBakeTask.php | 6 +- .../bake/src/Shell/Task/TemplateTask.php | 16 +- .../cakephp/bake/src/Shell/Task/TestTask.php | 28 +- .../src/Template/Bake/Command/command.twig | 1 - .../Template/Bake/Controller/component.twig | 1 - .../Template/Bake/Controller/controller.twig | 11 +- .../Template/Bake/Element/Controller/add.twig | 1 - .../Bake/Element/Controller/delete.twig | 1 - .../Bake/Element/Controller/edit.twig | 5 +- .../Bake/Element/Controller/index.twig | 5 +- .../Bake/Element/Controller/login.twig | 1 - .../Bake/Element/Controller/logout.twig | 1 - .../Bake/Element/Controller/view.twig | 5 +- .../Template/Bake/Element/array_property.twig | 1 - .../bake/src/Template/Bake/Form/form.twig | 2 +- .../bake/src/Template/Bake/Mailer/mailer.twig | 3 +- .../Template/Bake/Middleware/middleware.twig | 1 - .../src/Template/Bake/Model/behavior.twig | 1 - .../bake/src/Template/Bake/Model/entity.twig | 8 +- .../bake/src/Template/Bake/Model/table.twig | 1 - .../src/Template/Bake/Plugin/.gitignore.twig | 1 + .../src/Template/Bake/Plugin/README.md.twig | 2 +- .../Bake/Plugin/phpunit.xml.dist.twig | 5 +- .../src/Controller/AppController.php.twig | 1 - .../Bake/Plugin/tests/bootstrap.php.twig | 10 +- .../bake/src/Template/Bake/Shell/helper.twig | 1 - .../bake/src/Template/Bake/Shell/shell.twig | 1 - .../bake/src/Template/Bake/Shell/task.twig | 1 - .../bake/src/Template/Bake/View/cell.twig | 1 - .../bake/src/Template/Bake/View/helper.twig | 1 - .../bake/src/Template/Bake/tests/fixture.twig | 6 +- .../src/Template/Bake/tests/test_case.twig | 40 +- .../bake/src/Utility/CommonOptionsTrait.php | 9 +- .../src/Utility/Model/AssociationFilter.php | 2 - app/vendor/cakephp/bake/src/View/BakeView.php | 10 +- .../bake/src/View/Helper/BakeHelper.php | 41 +- .../bake/src/View/Helper/DocBlockHelper.php | 38 +- .../Fixture/BakeArticlesBakeTagsFixture.php | 3 +- .../tests/Fixture/BakeArticlesFixture.php | 5 +- .../bake/tests/Fixture/BakeCarFixture.php | 4 +- .../tests/Fixture/BakeCommentsFixture.php | 7 +- .../bake/tests/Fixture/BakeTagsFixture.php | 3 +- .../Fixture/BakeTemplateAuthorsFixture.php | 3 +- .../Fixture/BakeTemplateProfilesFixture.php | 3 +- .../Fixture/BakeTemplateRolesFixture.php | 2 +- .../bake/tests/Fixture/BinaryTestsFixture.php | 4 +- .../bake/tests/Fixture/CategoriesFixture.php | 4 +- .../Fixture/CategoriesProductsFixture.php | 4 +- .../tests/Fixture/CategoryThreadsFixture.php | 5 +- .../bake/tests/Fixture/DatatypesFixture.php | 3 +- .../bake/tests/Fixture/InvitationsFixture.php | 5 +- .../bake/tests/Fixture/NumberTreesFixture.php | 3 +- .../bake/tests/Fixture/OldProductsFixture.php | 4 +- .../tests/Fixture/ProductVersionsFixture.php | 4 +- .../bake/tests/Fixture/ProductsFixture.php | 4 +- app/vendor/cakephp/bake/tests/bootstrap.php | 6 +- .../cakephp/cakephp-codesniffer/.editorconfig | 1 - .../cakephp/cakephp-codesniffer/.gitignore | 1 + .../cakephp/cakephp-codesniffer/.travis.yml | 19 +- .../Commenting/DocBlockAlignmentSniff.php | 2 +- .../Commenting/FunctionCommentSniff.php | 50 +- .../Formatting/BlankLineBeforeReturnSniff.php | 6 +- .../UseInAlphabeticalOrderSniff.php | 14 +- .../Sniffs/PHP/CommaAfterArrayItemSniff.php | 73 + .../Sniffs/WhiteSpace/EmptyLinesSniff.php | 15 +- .../WhiteSpace/FunctionSpacingSniff.php | 191 +- .../WhiteSpace/OperatorSpacingSniff.php | 6 +- .../Commenting/DocBlockAlignmentUnitTest.php | 2 +- .../UseInAlphabeticalOrderUnitTest.3.inc | 13 + .../Tests/WhiteSpace/EmptyLinesUnitTest.inc | 4 + .../Tests/WhiteSpace/EmptyLinesUnitTest.php | 8 +- .../cakephp-codesniffer/CakePHP/ruleset.xml | 327 +- .../cakephp/cakephp-codesniffer/LICENSE.txt | 2 +- .../cakephp/cakephp-codesniffer/README.md | 31 +- .../cakephp/cakephp-codesniffer/composer.json | 13 +- .../cakephp/cakephp-codesniffer/phpcs.xml | 6 + .../cakephp-codesniffer/phpcs.xml.dist | 6 + .../cakephp/cakephp-codesniffer/phpunit.xml | 4 +- app/vendor/cakephp/cakephp/README.md | 6 +- app/vendor/cakephp/cakephp/VERSION.txt | 2 +- app/vendor/cakephp/cakephp/composer.json | 15 +- .../cakephp/cakephp/config/bootstrap.php | 6 +- app/vendor/cakephp/cakephp/config/config.php | 2 +- .../src/Auth/AbstractPasswordHasher.php | 8 +- .../cakephp/src/Auth/BaseAuthenticate.php | 26 +- .../cakephp/src/Auth/BasicAuthenticate.php | 14 +- .../cakephp/src/Auth/ControllerAuthorize.php | 1 - .../src/Auth/DefaultPasswordHasher.php | 7 +- .../cakephp/src/Auth/DigestAuthenticate.php | 9 +- .../src/Auth/FallbackPasswordHasher.php | 7 +- .../cakephp/src/Auth/FormAuthenticate.php | 4 +- .../src/Auth/PasswordHasherFactory.php | 1 - .../src/Auth/Storage/MemoryStorage.php | 1 - .../src/Auth/Storage/SessionStorage.php | 4 +- .../src/Auth/Storage/StorageInterface.php | 2 + .../cakephp/src/Auth/WeakPasswordHasher.php | 3 +- .../cakephp/cakephp/src/Cache/Cache.php | 3 +- .../cakephp/cakephp/src/Cache/CacheEngine.php | 10 +- .../src/Cache/CacheEngineInterface.php | 4 +- .../cakephp/src/Cache/CacheRegistry.php | 11 +- .../cakephp/src/Cache/Engine/ApcuEngine.php | 13 +- .../cakephp/src/Cache/Engine/ArrayEngine.php | 6 +- .../cakephp/src/Cache/Engine/FileEngine.php | 31 +- .../src/Cache/Engine/MemcachedEngine.php | 49 +- .../cakephp/src/Cache/Engine/NullEngine.php | 1 - .../cakephp/src/Cache/Engine/RedisEngine.php | 14 +- .../src/Cache/Engine/WincacheEngine.php | 7 +- .../cakephp/src/Cache/Engine/XcacheEngine.php | 9 +- .../cakephp/cakephp/src/Cache/README.md | 4 +- .../cakephp/src/Cache/SimpleCacheEngine.php | 4 +- .../cakephp/cakephp/src/Cache/composer.json | 2 +- .../cakephp/src/Collection/Collection.php | 1 - .../src/Collection/CollectionInterface.php | 11 +- .../src/Collection/CollectionTrait.php | 7 +- .../cakephp/src/Collection/ExtractTrait.php | 9 +- .../Collection/Iterator/BufferedIterator.php | 7 +- .../Collection/Iterator/ExtractIterator.php | 2 +- .../Collection/Iterator/FilterIterator.php | 1 - .../Collection/Iterator/InsertIterator.php | 1 - .../src/Collection/Iterator/MapReduce.php | 2 +- .../src/Collection/Iterator/NestIterator.php | 3 +- .../Iterator/NoChildrenIterator.php | 1 - .../Collection/Iterator/ReplaceIterator.php | 1 - .../src/Collection/Iterator/SortIterator.php | 1 - .../Collection/Iterator/StoppableIterator.php | 1 - .../src/Collection/Iterator/TreeIterator.php | 1 - .../src/Collection/Iterator/TreePrinter.php | 1 - .../Collection/Iterator/UnfoldIterator.php | 1 - .../src/Collection/Iterator/ZipIterator.php | 5 +- .../cakephp/cakephp/src/Collection/README.md | 2 +- .../cakephp/src/Collection/composer.json | 2 +- .../cakephp/src/Command/HelpCommand.php | 3 +- .../cakephp/cakephp/src/Console/Command.php | 22 +- .../cakephp/src/Console/CommandCollection.php | 2 +- .../CommandCollectionAwareInterface.php | 1 - .../cakephp/src/Console/CommandFactory.php | 1 - .../cakephp/src/Console/CommandRunner.php | 15 +- .../cakephp/src/Console/CommandScanner.php | 5 +- .../src/Console/ConsoleErrorHandler.php | 1 - .../cakephp/src/Console/ConsoleInput.php | 5 +- .../src/Console/ConsoleInputArgument.php | 9 +- .../src/Console/ConsoleInputOption.php | 15 +- .../src/Console/ConsoleInputSubcommand.php | 3 +- .../cakephp/cakephp/src/Console/ConsoleIo.php | 62 +- .../src/Console/ConsoleOptionParser.php | 19 +- .../cakephp/src/Console/ConsoleOutput.php | 15 +- .../Console/Exception/ConsoleException.php | 2 +- .../Exception/MissingHelperException.php | 3 + .../Exception/MissingShellException.php | 4 +- .../Exception/MissingShellMethodException.php | 4 +- .../Exception/MissingTaskException.php | 3 + .../src/Console/Exception/StopException.php | 2 +- .../cakephp/src/Console/HelpFormatter.php | 7 +- .../cakephp/src/Console/HelperRegistry.php | 7 +- .../cakephp/cakephp/src/Console/Shell.php | 61 +- .../cakephp/src/Console/ShellDispatcher.php | 3 +- .../cakephp/src/Console/TaskRegistry.php | 7 +- .../cakephp/src/Controller/Component.php | 2 +- .../Controller/Component/AuthComponent.php | 31 +- .../Controller/Component/CookieComponent.php | 4 +- .../Controller/Component/CsrfComponent.php | 1 - .../Controller/Component/FlashComponent.php | 5 +- .../Component/PaginatorComponent.php | 7 +- .../Component/RequestHandlerComponent.php | 25 +- .../Component/SecurityComponent.php | 34 +- .../src/Controller/ComponentRegistry.php | 15 +- .../cakephp/src/Controller/Controller.php | 41 +- .../src/Controller/ErrorController.php | 1 - .../Exception/AuthSecurityException.php | 1 + .../Exception/MissingActionException.php | 1 - .../Exception/MissingComponentException.php | 4 +- .../Exception/SecurityException.php | 9 +- app/vendor/cakephp/cakephp/src/Core/App.php | 13 +- .../cakephp/cakephp/src/Core/BasePlugin.php | 1 - .../cakephp/cakephp/src/Core/ClassLoader.php | 3 +- .../cakephp/cakephp/src/Core/Configure.php | 17 +- .../Core/Configure/ConfigEngineInterface.php | 1 - .../src/Core/Configure/Engine/IniConfig.php | 1 - .../src/Core/Configure/Engine/JsonConfig.php | 1 - .../src/Core/Configure/Engine/PhpConfig.php | 5 +- .../src/Core/Configure/FileConfigTrait.php | 1 - .../cakephp/src/Core/ConventionsTrait.php | 1 - .../cakephp/src/Core/Exception/Exception.php | 7 +- .../Core/Exception/MissingPluginException.php | 4 +- .../cakephp/src/Core/InstanceConfigTrait.php | 29 +- .../cakephp/src/Core/ObjectRegistry.php | 5 +- .../cakephp/cakephp/src/Core/Plugin.php | 13 +- .../cakephp/src/Core/PluginCollection.php | 2 +- .../cakephp/src/Core/PluginInterface.php | 2 + app/vendor/cakephp/cakephp/src/Core/README.md | 4 +- .../cakephp/src/Core/Retry/CommandRetry.php | 1 - .../src/Core/Retry/RetryStrategyInterface.php | 2 +- .../cakephp/src/Core/StaticConfigTrait.php | 36 +- .../cakephp/cakephp/src/Core/composer.json | 2 +- .../cakephp/cakephp/src/Core/functions.php | 18 +- .../cakephp/src/Database/Connection.php | 44 +- .../Database/Dialect/MysqlDialectTrait.php | 1 - .../Database/Dialect/PostgresDialectTrait.php | 3 +- .../Database/Dialect/SqliteDialectTrait.php | 5 +- .../Dialect/SqlserverDialectTrait.php | 21 +- .../TupleComparisonTranslatorTrait.php | 10 +- .../cakephp/cakephp/src/Database/Driver.php | 23 +- .../cakephp/src/Database/Driver/Mysql.php | 1 - .../src/Database/Driver/PDODriverTrait.php | 3 +- .../cakephp/src/Database/Driver/Postgres.php | 3 +- .../cakephp/src/Database/Driver/Sqlite.php | 3 +- .../cakephp/src/Database/Driver/Sqlserver.php | 4 +- .../cakephp/src/Database/DriverInterface.php | 11 +- .../cakephp/src/Database/Exception.php | 1 - .../Exception/MissingConnectionException.php | 1 - .../Exception/MissingDriverException.php | 1 - .../Exception/MissingExtensionException.php | 1 - .../NestedTransactionRollbackException.php | 1 - .../Database/Expression/BetweenExpression.php | 8 +- .../Database/Expression/CaseExpression.php | 7 - .../src/Database/Expression/Comparison.php | 18 +- .../Database/Expression/FieldInterface.php | 1 - .../src/Database/Expression/FieldTrait.php | 1 - .../Expression/FunctionExpression.php | 1 - .../Expression/IdentifierExpression.php | 9 +- .../Database/Expression/OrderByExpression.php | 1 - .../Expression/OrderClauseExpression.php | 5 +- .../Database/Expression/QueryExpression.php | 9 +- .../Database/Expression/TupleComparison.php | 32 +- .../Database/Expression/UnaryExpression.php | 10 +- .../Database/Expression/ValuesExpression.php | 6 +- .../src/Database/ExpressionInterface.php | 1 - .../src/Database/FieldTypeConverter.php | 1 - .../cakephp/src/Database/FunctionsBuilder.php | 51 +- .../cakephp/src/Database/IdentifierQuoter.php | 1 - .../cakephp/src/Database/Log/LoggedQuery.php | 1 - .../src/Database/Log/LoggingStatement.php | 1 - .../cakephp/src/Database/Log/QueryLogger.php | 1 - .../cakephp/cakephp/src/Database/Query.php | 61 +- .../cakephp/src/Database/QueryCompiler.php | 8 +- .../cakephp/cakephp/src/Database/README.md | 2 +- .../src/Database/Schema/BaseSchema.php | 9 +- .../src/Database/Schema/CachedCollection.php | 10 +- .../src/Database/Schema/Collection.php | 7 +- .../src/Database/Schema/MysqlSchema.php | 37 +- .../src/Database/Schema/PostgresSchema.php | 26 +- .../Database/Schema/SqlGeneratorInterface.php | 1 - .../src/Database/Schema/SqliteSchema.php | 43 +- .../src/Database/Schema/SqlserverSchema.php | 41 +- .../src/Database/Schema/TableSchema.php | 5 +- .../Schema/TableSchemaAwareInterface.php | 1 - .../Database/Schema/TableSchemaInterface.php | 1 - .../cakephp/src/Database/SchemaCache.php | 5 +- .../cakephp/src/Database/SqlDialectTrait.php | 33 +- .../cakephp/src/Database/SqliteCompiler.php | 1 - .../src/Database/SqlserverCompiler.php | 5 +- .../Database/Statement/BufferResultsTrait.php | 1 - .../Database/Statement/BufferedStatement.php | 7 +- .../Database/Statement/CallbackStatement.php | 5 +- .../src/Database/Statement/MysqlStatement.php | 2 - .../src/Database/Statement/PDOStatement.php | 1 - .../Database/Statement/SqliteStatement.php | 2 - .../Database/Statement/SqlserverStatement.php | 5 +- .../cakephp/cakephp/src/Database/Type.php | 3 +- .../Database/Type/BatchCastingInterface.php | 1 - .../cakephp/src/Database/Type/BinaryType.php | 6 +- .../src/Database/Type/BinaryUuidType.php | 7 +- .../src/Database/Type/DateTimeType.php | 11 +- .../cakephp/src/Database/Type/DateType.php | 3 +- .../cakephp/src/Database/Type/DecimalType.php | 5 +- .../Type/ExpressionTypeCasterTrait.php | 2 - .../Database/Type/ExpressionTypeInterface.php | 1 - .../cakephp/src/Database/Type/FloatType.php | 7 +- .../cakephp/src/Database/Type/JsonType.php | 2 +- .../Type/OptionalConvertInterface.php | 1 - .../cakephp/src/Database/Type/StringType.php | 3 +- .../cakephp/src/Database/Type/TimeType.php | 3 +- .../cakephp/src/Database/Type/UuidType.php | 3 +- .../src/Database/TypeConverterTrait.php | 1 - .../cakephp/src/Database/TypeInterface.php | 1 - .../cakephp/cakephp/src/Database/TypeMap.php | 5 +- .../cakephp/src/Database/TypeMapTrait.php | 1 - .../src/Database/TypedResultInterface.php | 1 - .../cakephp/src/Database/TypedResultTrait.php | 1 - .../cakephp/src/Database/ValueBinder.php | 3 +- .../cakephp/src/Database/composer.json | 2 +- .../src/Datasource/ConnectionInterface.php | 2 + .../src/Datasource/ConnectionManager.php | 3 +- .../src/Datasource/ConnectionRegistry.php | 7 +- .../src/Datasource/EntityInterface.php | 15 +- .../cakephp/src/Datasource/EntityTrait.php | 115 +- .../Exception/InvalidPrimaryKeyException.php | 1 - .../MissingDatasourceConfigException.php | 4 +- .../Exception/MissingDatasourceException.php | 4 +- .../Exception/MissingModelException.php | 4 +- .../Exception/RecordNotFoundException.php | 1 - .../src/Datasource/ModelAwareTrait.php | 3 - .../cakephp/src/Datasource/Paginator.php | 229 +- .../cakephp/src/Datasource/QueryCacher.php | 1 - .../cakephp/src/Datasource/QueryInterface.php | 20 +- .../cakephp/src/Datasource/QueryTrait.php | 5 +- .../cakephp/cakephp/src/Datasource/README.md | 2 +- .../src/Datasource/RepositoryInterface.php | 1 - .../src/Datasource/ResultSetDecorator.php | 1 - .../src/Datasource/RulesAwareTrait.php | 1 - .../src/Datasource/SchemaInterface.php | 1 - .../src/Datasource/SimplePaginator.php | 38 + .../src/Datasource/TableSchemaInterface.php | 1 - .../cakephp/src/Datasource/composer.json | 2 +- .../cakephp/src/Error/BaseErrorHandler.php | 21 +- .../cakephp/cakephp/src/Error/Debugger.php | 23 +- .../cakephp/src/Error/ErrorHandler.php | 11 +- .../cakephp/src/Error/ExceptionRenderer.php | 14 +- .../cakephp/src/Error/FatalErrorException.php | 1 - .../Middleware/ErrorHandlerMiddleware.php | 11 +- .../cakephp/src/Error/PHP7ErrorException.php | 1 - .../src/Event/Decorator/AbstractDecorator.php | 1 - .../Event/Decorator/ConditionDecorator.php | 1 - .../Decorator/SubjectFilterDecorator.php | 1 - .../cakephp/cakephp/src/Event/Event.php | 1 - .../src/Event/EventDispatcherInterface.php | 1 - .../src/Event/EventDispatcherTrait.php | 2 - .../cakephp/cakephp/src/Event/EventList.php | 1 - .../src/Event/EventListenerInterface.php | 1 - .../cakephp/src/Event/EventManager.php | 10 +- .../src/Event/EventManagerInterface.php | 2 - .../cakephp/src/Event/EventManagerTrait.php | 1 - .../cakephp/cakephp/src/Event/README.md | 2 +- .../cakephp/cakephp/src/Event/composer.json | 2 +- .../cakephp/cakephp/src/Filesystem/File.php | 35 +- .../cakephp/cakephp/src/Filesystem/Folder.php | 37 +- .../cakephp/cakephp/src/Filesystem/README.md | 2 +- .../cakephp/src/Filesystem/composer.json | 2 +- app/vendor/cakephp/cakephp/src/Form/Form.php | 22 +- app/vendor/cakephp/cakephp/src/Form/README.md | 2 +- .../cakephp/cakephp/src/Form/Schema.php | 5 +- .../cakephp/cakephp/src/Form/composer.json | 2 +- .../cakephp/src/Http/BaseApplication.php | 23 +- .../cakephp/src/Http/CallbackStream.php | 4 +- .../cakephp/cakephp/src/Http/Client.php | 21 +- .../cakephp/src/Http/Client/Adapter/Curl.php | 16 +- .../src/Http/Client/Adapter/Stream.php | 3 +- .../cakephp/src/Http/Client/Auth/Basic.php | 3 +- .../cakephp/src/Http/Client/Auth/Digest.php | 1 - .../cakephp/src/Http/Client/Auth/Oauth.php | 8 +- .../src/Http/Client/CookieCollection.php | 3 +- .../cakephp/src/Http/Client/FormData.php | 5 +- .../cakephp/src/Http/Client/FormDataPart.php | 50 +- .../cakephp/src/Http/Client/Message.php | 1 - .../cakephp/src/Http/Client/Request.php | 6 +- .../cakephp/src/Http/Client/Response.php | 24 +- .../cakephp/src/Http/ControllerFactory.php | 5 +- .../cakephp/src/Http/Cookie/Cookie.php | 72 +- .../src/Http/Cookie/CookieCollection.php | 3 +- .../src/Http/Cookie/CookieInterface.php | 36 +- .../cakephp/cakephp/src/Http/CorsBuilder.php | 5 +- .../Http/Exception/BadRequestException.php | 1 - .../src/Http/Exception/ConflictException.php | 1 - .../src/Http/Exception/ForbiddenException.php | 1 - .../src/Http/Exception/GoneException.php | 1 - .../Http/Exception/InternalErrorException.php | 1 - .../Exception/InvalidCsrfTokenException.php | 1 - .../Exception/MethodNotAllowedException.php | 1 - .../Http/Exception/NotAcceptableException.php | 1 - .../src/Http/Exception/NotFoundException.php | 1 - .../Exception/NotImplementedException.php | 1 - .../Exception/ServiceUnavailableException.php | 1 - .../Http/Exception/UnauthorizedException.php | 1 - .../UnavailableForLegalReasonsException.php | 1 - .../src/Http/Middleware/CspMiddleware.php | 72 + .../Middleware/CsrfProtectionMiddleware.php | 10 +- .../Middleware/EncryptedCookieMiddleware.php | 1 + .../Middleware/SecurityHeadersMiddleware.php | 2 +- .../cakephp/src/Http/MiddlewareQueue.php | 12 +- .../cakephp/src/Http/RequestTransformer.php | 2 +- .../cakephp/cakephp/src/Http/Response.php | 139 +- .../cakephp/src/Http/ResponseEmitter.php | 81 +- .../cakephp/src/Http/ResponseTransformer.php | 4 +- .../cakephp/cakephp/src/Http/Server.php | 5 +- .../cakephp/src/Http/ServerRequest.php | 84 +- .../cakephp/src/Http/ServerRequestFactory.php | 10 +- .../cakephp/cakephp/src/Http/Session.php | 51 +- .../cakephp/src/Http/Session/CacheSession.php | 10 +- .../cakephp/src/I18n/ChainMessagesLoader.php | 1 - .../cakephp/src/I18n/DateFormatTrait.php | 73 +- .../src/I18n/Formatter/IcuFormatter.php | 20 - .../src/I18n/Formatter/SprintfFormatter.php | 3 - .../cakephp/cakephp/src/I18n/FrozenTime.php | 2 +- app/vendor/cakephp/cakephp/src/I18n/I18n.php | 5 +- .../cakephp/src/I18n/MessagesFileLoader.php | 7 +- .../cakephp/cakephp/src/I18n/Number.php | 148 +- .../cakephp/src/I18n/Parser/MoFileParser.php | 14 +- .../cakephp/src/I18n/Parser/PoFileParser.php | 9 +- .../cakephp/cakephp/src/I18n/PluralRules.php | 49 +- app/vendor/cakephp/cakephp/src/I18n/README.md | 8 +- .../src/I18n/RelativeTimeFormatter.php | 8 +- app/vendor/cakephp/cakephp/src/I18n/Time.php | 6 +- .../cakephp/cakephp/src/I18n/Translator.php | 11 +- .../cakephp/src/I18n/TranslatorFactory.php | 2 +- .../cakephp/src/I18n/TranslatorRegistry.php | 7 +- .../cakephp/cakephp/src/I18n/composer.json | 2 +- .../cakephp/cakephp/src/I18n/functions.php | 65 +- .../cakephp/src/Log/Engine/BaseLog.php | 4 +- .../cakephp/src/Log/Engine/ConsoleLog.php | 1 - .../cakephp/src/Log/Engine/FileLog.php | 7 +- .../cakephp/src/Log/Engine/SyslogLog.php | 5 +- app/vendor/cakephp/cakephp/src/Log/Log.php | 9 +- .../cakephp/src/Log/LogEngineRegistry.php | 7 +- .../cakephp/cakephp/src/Log/LogTrait.php | 7 +- app/vendor/cakephp/cakephp/src/Log/README.md | 4 +- .../cakephp/cakephp/src/Log/composer.json | 2 +- .../cakephp/cakephp/src/Mailer/Email.php | 88 +- .../Exception/MissingActionException.php | 1 - .../Exception/MissingMailerException.php | 4 +- .../cakephp/cakephp/src/Mailer/Mailer.php | 1 - .../cakephp/src/Mailer/MailerAwareTrait.php | 1 - .../src/Mailer/Transport/DebugTransport.php | 1 - .../src/Mailer/Transport/MailTransport.php | 1 - .../src/Mailer/Transport/SmtpTransport.php | 85 +- .../cakephp/src/Mailer/TransportFactory.php | 2 +- .../cakephp/src/Mailer/TransportRegistry.php | 6 +- .../src/Network/Exception/SocketException.php | 1 - .../cakephp/cakephp/src/Network/Socket.php | 34 +- .../cakephp/cakephp/src/ORM/Association.php | 29 +- .../cakephp/src/ORM/Association/BelongsTo.php | 13 +- .../src/ORM/Association/BelongsToMany.php | 59 +- .../ORM/Association/DependentDeleteHelper.php | 1 - .../ORM/Association/DependentDeleteTrait.php | 1 - .../cakephp/src/ORM/Association/HasMany.php | 34 +- .../cakephp/src/ORM/Association/HasOne.php | 8 +- .../ORM/Association/Loader/SelectLoader.php | 5 +- .../Loader/SelectWithPivotLoader.php | 10 +- .../cakephp/src/ORM/AssociationCollection.php | 5 +- .../src/ORM/AssociationsNormalizerTrait.php | 3 +- .../cakephp/cakephp/src/ORM/Behavior.php | 17 +- .../src/ORM/Behavior/CounterCacheBehavior.php | 7 +- .../src/ORM/Behavior/TimestampBehavior.php | 16 +- .../ORM/Behavior/Translate/TranslateTrait.php | 1 - .../src/ORM/Behavior/TranslateBehavior.php | 45 +- .../cakephp/src/ORM/Behavior/TreeBehavior.php | 79 +- .../cakephp/src/ORM/BehaviorRegistry.php | 7 +- .../cakephp/cakephp/src/ORM/EagerLoadable.php | 7 +- .../cakephp/cakephp/src/ORM/EagerLoader.php | 26 +- app/vendor/cakephp/cakephp/src/ORM/Entity.php | 6 +- .../Exception/MissingBehaviorException.php | 4 +- .../ORM/Exception/MissingEntityException.php | 4 +- .../Exception/MissingTableClassException.php | 4 +- .../Exception/PersistenceFailedException.php | 1 - .../RolledbackTransactionException.php | 4 +- .../cakephp/src/ORM/LazyEagerLoader.php | 1 - .../src/ORM/Locator/LocatorAwareTrait.php | 3 +- .../src/ORM/Locator/LocatorInterface.php | 1 - .../cakephp/src/ORM/Locator/TableLocator.php | 5 +- .../cakephp/cakephp/src/ORM/Marshaller.php | 57 +- app/vendor/cakephp/cakephp/src/ORM/Query.php | 52 +- app/vendor/cakephp/cakephp/src/ORM/README.md | 18 +- .../cakephp/cakephp/src/ORM/ResultSet.php | 11 +- .../cakephp/cakephp/src/ORM/Rule/ExistsIn.php | 1 - .../cakephp/cakephp/src/ORM/Rule/IsUnique.php | 1 - .../cakephp/src/ORM/Rule/ValidCount.php | 1 - .../cakephp/cakephp/src/ORM/RulesChecker.php | 3 +- .../cakephp/src/ORM/SaveOptionsBuilder.php | 1 - app/vendor/cakephp/cakephp/src/ORM/Table.php | 223 +- .../cakephp/cakephp/src/ORM/TableRegistry.php | 1 - .../cakephp/cakephp/src/ORM/composer.json | 2 +- .../cakephp/src/Routing/Dispatcher.php | 1 - .../cakephp/src/Routing/DispatcherFactory.php | 1 - .../cakephp/src/Routing/DispatcherFilter.php | 6 +- .../DuplicateNamedRouteException.php | 1 - .../Exception/MissingControllerException.php | 1 - .../MissingDispatcherFilterException.php | 1 - .../Exception/MissingRouteException.php | 1 - .../Routing/Exception/RedirectException.php | 1 - .../src/Routing/Filter/AssetFilter.php | 6 +- .../Filter/ControllerFactoryFilter.php | 1 - .../Routing/Filter/LocaleSelectorFilter.php | 3 +- .../src/Routing/Filter/RoutingFilter.php | 5 +- .../Routing/Middleware/AssetMiddleware.php | 10 +- .../Routing/Middleware/RoutingMiddleware.php | 6 +- .../src/Routing/RequestActionTrait.php | 9 +- .../cakephp/src/Routing/Route/DashedRoute.php | 1 - .../src/Routing/Route/InflectedRoute.php | 1 - .../src/Routing/Route/PluginShortRoute.php | 1 - .../src/Routing/Route/RedirectRoute.php | 1 - .../cakephp/src/Routing/Route/Route.php | 41 +- .../cakephp/src/Routing/RouteBuilder.php | 68 +- .../cakephp/src/Routing/RouteCollection.php | 15 +- .../cakephp/cakephp/src/Routing/Router.php | 29 +- .../cakephp/cakephp/src/Shell/CacheShell.php | 11 +- .../cakephp/src/Shell/CommandListShell.php | 5 +- .../cakephp/src/Shell/CompletionShell.php | 17 +- .../src/Shell/Helper/ProgressHelper.php | 9 +- .../cakephp/src/Shell/Helper/TableHelper.php | 13 +- .../cakephp/cakephp/src/Shell/I18nShell.php | 17 +- .../cakephp/src/Shell/OrmCacheShell.php | 1 - .../cakephp/cakephp/src/Shell/PluginShell.php | 3 +- .../cakephp/cakephp/src/Shell/RoutesShell.php | 18 +- .../cakephp/src/Shell/SchemaCacheShell.php | 1 - .../cakephp/cakephp/src/Shell/ServerShell.php | 11 +- .../cakephp/src/Shell/Task/AssetsTask.php | 14 +- .../cakephp/src/Shell/Task/CommandTask.php | 14 +- .../cakephp/src/Shell/Task/ExtractTask.php | 56 +- .../cakephp/src/Shell/Task/LoadTask.php | 1 - .../cakephp/src/Shell/Task/UnloadTask.php | 1 - .../Template/Element/plugin_class_error.ctp | 4 +- .../cakephp/src/Template/Layout/dev_error.ctp | 2 +- .../TestSuite/ConsoleIntegrationTestTrait.php | 7 + .../Constraint/Console/ContentsBase.php | 3 +- .../Constraint/Console/ContentsContain.php | 1 - .../Constraint/Console/ContentsContainRow.php | 3 +- .../Constraint/Console/ContentsEmpty.php | 1 - .../Constraint/Console/ContentsNotContain.php | 1 - .../Constraint/Console/ContentsRegExp.php | 3 +- .../TestSuite/Constraint/Console/ExitCode.php | 1 - .../Constraint/Email/MailConstraintBase.php | 6 +- .../Constraint/Email/MailContains.php | 1 - .../Email/MailContainsAttachment.php | 76 + .../Constraint/Email/MailContainsHtml.php | 3 + .../Constraint/Email/MailContainsText.php | 3 + .../TestSuite/Constraint/Email/MailCount.php | 1 - .../Constraint/Email/MailSentFrom.php | 3 + .../TestSuite/Constraint/Email/MailSentTo.php | 3 + .../Constraint/Email/MailSentWith.php | 29 +- .../TestSuite/Constraint/Email/NoMailSent.php | 1 - .../TestSuite/Constraint/EventFiredWith.php | 2 +- .../Constraint/Response/BodyContains.php | 1 - .../Constraint/Response/BodyEmpty.php | 1 - .../Constraint/Response/BodyEquals.php | 1 - .../Constraint/Response/BodyNotContains.php | 1 - .../Constraint/Response/BodyNotEmpty.php | 1 - .../Constraint/Response/BodyNotEquals.php | 1 - .../Constraint/Response/BodyNotRegExp.php | 1 - .../Constraint/Response/BodyRegExp.php | 3 +- .../Constraint/Response/ContentType.php | 3 +- .../Response/CookieEncryptedEquals.php | 2 +- .../Constraint/Response/CookieEquals.php | 2 +- .../Constraint/Response/CookieNotSet.php | 3 +- .../Constraint/Response/CookieSet.php | 3 +- .../Constraint/Response/FileSent.php | 1 - .../Constraint/Response/FileSentAs.php | 1 - .../Constraint/Response/HeaderContains.php | 3 +- .../Constraint/Response/HeaderEquals.php | 4 +- .../Constraint/Response/HeaderNotContains.php | 3 +- .../Constraint/Response/ResponseBase.php | 1 - .../Constraint/Response/StatusCode.php | 5 +- .../Constraint/Response/StatusCodeBase.php | 1 - .../Constraint/Response/StatusError.php | 4 +- .../Constraint/Response/StatusFailure.php | 4 +- .../Constraint/Response/StatusOk.php | 4 +- .../Constraint/Response/StatusSuccess.php | 4 +- .../Constraint/Session/FlashParamEquals.php | 5 +- .../Constraint/Session/SessionEquals.php | 1 - .../Constraint/View/LayoutFileEquals.php | 3 +- .../Constraint/View/TemplateFileEquals.php | 3 +- .../src/TestSuite/EmailAssertTrait.php | 2 - .../cakephp/src/TestSuite/EmailTrait.php | 47 +- .../src/TestSuite/Fixture/FixtureInjector.php | 1 - .../src/TestSuite/Fixture/FixtureManager.php | 24 +- .../src/TestSuite/Fixture/TestFixture.php | 5 +- .../src/TestSuite/IntegrationTestTrait.php | 30 +- .../src/TestSuite/LegacyRequestDispatcher.php | 1 - .../src/TestSuite/MiddlewareDispatcher.php | 6 +- .../cakephp/src/TestSuite/MockBuilder.php | 57 + .../src/TestSuite/StringCompareTrait.php | 1 - .../src/TestSuite/Stub/ConsoleInput.php | 10 +- .../src/TestSuite/Stub/ConsoleOutput.php | 3 +- .../Stub/MissingConsoleInputException.php | 33 + .../cakephp/src/TestSuite/Stub/Response.php | 3 +- .../TestSuite/Stub/TestExceptionRenderer.php | 1 - .../cakephp/src/TestSuite/TestCase.php | 172 +- .../src/TestSuite/TestEmailTransport.php | 2 +- .../cakephp/src/TestSuite/TestSuite.php | 1 - .../cakephp/src/Utility/CookieCryptTrait.php | 13 +- .../cakephp/src/Utility/Crypto/Mcrypt.php | 3 +- .../cakephp/src/Utility/Crypto/OpenSsl.php | 8 +- .../src/Utility/Exception/XmlException.php | 1 - .../cakephp/cakephp/src/Utility/Hash.php | 107 +- .../cakephp/cakephp/src/Utility/Inflector.php | 59 +- .../src/Utility/MergeVariablesTrait.php | 4 +- .../cakephp/cakephp/src/Utility/README.md | 10 +- .../cakephp/cakephp/src/Utility/Security.php | 16 +- .../cakephp/cakephp/src/Utility/Text.php | 77 +- .../cakephp/cakephp/src/Utility/Xml.php | 26 +- .../cakephp/cakephp/src/Utility/composer.json | 2 +- .../cakephp/cakephp/src/Validation/README.md | 4 +- .../cakephp/src/Validation/RulesProvider.php | 5 +- .../src/Validation/ValidatableInterface.php | 1 - .../cakephp/src/Validation/Validation.php | 301 +- .../cakephp/src/Validation/ValidationRule.php | 5 +- .../cakephp/src/Validation/ValidationSet.php | 3 +- .../cakephp/src/Validation/Validator.php | 211 +- .../Validation/ValidatorAwareInterface.php | 1 - .../src/Validation/ValidatorAwareTrait.php | 5 +- .../cakephp/src/Validation/composer.json | 2 +- .../cakephp/cakephp/src/View/AjaxView.php | 1 - app/vendor/cakephp/cakephp/src/View/Cell.php | 5 +- .../cakephp/cakephp/src/View/CellTrait.php | 3 +- .../View/Exception/MissingCellException.php | 4 +- .../Exception/MissingCellViewException.php | 4 +- .../Exception/MissingElementException.php | 5 +- .../View/Exception/MissingHelperException.php | 4 +- .../View/Exception/MissingLayoutException.php | 4 +- .../Exception/MissingTemplateException.php | 4 +- .../View/Exception/MissingViewException.php | 4 +- .../cakephp/src/View/Form/ArrayContext.php | 10 +- .../cakephp/src/View/Form/ContextFactory.php | 6 +- .../src/View/Form/ContextInterface.php | 3 +- .../cakephp/src/View/Form/EntityContext.php | 13 +- .../cakephp/src/View/Form/FormContext.php | 11 +- .../cakephp/src/View/Form/NullContext.php | 1 - .../cakephp/cakephp/src/View/Helper.php | 7 +- .../src/View/Helper/BreadcrumbsHelper.php | 11 +- .../cakephp/src/View/Helper/FlashHelper.php | 1 - .../cakephp/src/View/Helper/FormHelper.php | 156 +- .../cakephp/src/View/Helper/HtmlHelper.php | 128 +- .../src/View/Helper/IdGeneratorTrait.php | 1 - .../cakephp/src/View/Helper/NumberHelper.php | 33 +- .../src/View/Helper/PaginatorHelper.php | 82 +- .../cakephp/src/View/Helper/RssHelper.php | 9 +- .../cakephp/src/View/Helper/SessionHelper.php | 3 +- .../cakephp/src/View/Helper/TextHelper.php | 53 +- .../cakephp/src/View/Helper/TimeHelper.php | 34 +- .../cakephp/src/View/Helper/UrlHelper.php | 12 +- .../cakephp/src/View/HelperRegistry.php | 5 +- .../cakephp/cakephp/src/View/JsonView.php | 1 - .../cakephp/src/View/SerializedView.php | 7 +- .../cakephp/src/View/StringTemplate.php | 7 +- .../cakephp/src/View/StringTemplateTrait.php | 3 +- app/vendor/cakephp/cakephp/src/View/View.php | 70 +- .../cakephp/cakephp/src/View/ViewBlock.php | 5 +- .../cakephp/cakephp/src/View/ViewBuilder.php | 25 +- .../cakephp/src/View/ViewVarsTrait.php | 1 - .../cakephp/src/View/Widget/BasicWidget.php | 3 +- .../cakephp/src/View/Widget/ButtonWidget.php | 3 +- .../src/View/Widget/CheckboxWidget.php | 5 +- .../src/View/Widget/DateTimeWidget.php | 7 +- .../cakephp/src/View/Widget/FileWidget.php | 3 +- .../cakephp/src/View/Widget/LabelWidget.php | 3 +- .../src/View/Widget/MultiCheckboxWidget.php | 14 +- .../src/View/Widget/NestingLabelWidget.php | 1 - .../cakephp/src/View/Widget/RadioWidget.php | 11 +- .../src/View/Widget/SelectBoxWidget.php | 12 +- .../src/View/Widget/TextareaWidget.php | 4 +- .../src/View/Widget/WidgetInterface.php | 3 +- .../cakephp/src/View/Widget/WidgetLocator.php | 4 +- .../cakephp/cakephp/src/View/XmlView.php | 1 - app/vendor/cakephp/cakephp/src/basics.php | 18 +- .../cakephp/tests/Fixture/ArticlesFixture.php | 5 +- .../tests/Fixture/ArticlesTagsFixture.php | 7 +- .../Fixture/AssertIntegrationTestCase.php | 1 - .../tests/Fixture/AttachmentsFixture.php | 5 +- .../tests/Fixture/AuthUsersFixture.php | 3 +- .../cakephp/tests/Fixture/AuthorsFixture.php | 3 +- .../tests/Fixture/AuthorsTagsFixture.php | 5 +- .../tests/Fixture/BinaryUuiditemsFixture.php | 3 +- .../tests/Fixture/CakeSessionsFixture.php | 3 +- .../tests/Fixture/CategoriesFixture.php | 3 +- .../cakephp/tests/Fixture/CommentsFixture.php | 5 +- .../Fixture/CompositeIncrementsFixture.php | 3 +- .../Fixture/CounterCacheCategoriesFixture.php | 3 +- .../Fixture/CounterCacheCommentsFixture.php | 3 +- .../Fixture/CounterCachePostsFixture.php | 3 +- .../CounterCacheUserCategoryPostsFixture.php | 5 +- .../Fixture/CounterCacheUsersFixture.php | 3 +- .../tests/Fixture/DatatypesFixture.php | 3 +- .../cakephp/tests/Fixture/DateKeysFixture.php | 3 +- .../tests/Fixture/FeaturedTagsFixture.php | 5 +- .../tests/Fixture/FixturizedTestCase.php | 2 +- .../cakephp/tests/Fixture/GroupsFixture.php | 3 +- .../tests/Fixture/GroupsMembersFixture.php | 3 +- .../cakephp/tests/Fixture/MembersFixture.php | 3 +- .../tests/Fixture/MenuLinkTreesFixture.php | 3 +- .../tests/Fixture/NumberTreesFixture.php | 27 +- .../tests/Fixture/OrderedUuidItemsFixture.php | 4 +- .../cakephp/tests/Fixture/OrdersFixture.php | 13 +- .../Fixture/PolymorphicTaggedFixture.php | 3 +- .../cakephp/tests/Fixture/PostsFixture.php | 5 +- .../cakephp/tests/Fixture/ProductsFixture.php | 4 +- .../cakephp/tests/Fixture/ProfilesFixture.php | 3 +- .../cakephp/tests/Fixture/SessionsFixture.php | 3 +- .../tests/Fixture/SiteArticlesFixture.php | 5 +- .../tests/Fixture/SiteArticlesTagsFixture.php | 7 +- .../tests/Fixture/SiteAuthorsFixture.php | 5 +- .../cakephp/tests/Fixture/SiteTagsFixture.php | 5 +- .../tests/Fixture/SpecialTagsFixture.php | 7 +- .../cakephp/tests/Fixture/TagsFixture.php | 5 +- .../tests/Fixture/TagsTranslationsFixture.php | 5 +- .../Fixture/TestPluginCommentsFixture.php | 5 +- .../cakephp/tests/Fixture/ThingsFixture.php | 5 +- .../tests/Fixture/TranslatesFixture.php | 3 +- .../cakephp/tests/Fixture/UsersFixture.php | 3 +- .../tests/Fixture/UuiditemsFixture.php | 5 +- .../tests/Fixture/UuidportfoliosFixture.php | 3 +- ...tionTableMixinClassReflectionExtension.php | 7 +- .../TableFindByPropertyMethodReflection.php | 13 +- .../cakephp/cakephp/tests/bootstrap.php | 15 +- .../cakephp/cakephp/tests/phpunit_aliases.php | 4 + app/vendor/cakephp/chronos/.appveyor.yml | 34 + app/vendor/cakephp/chronos/README.md | 11 +- app/vendor/cakephp/chronos/composer.json | 8 +- app/vendor/cakephp/chronos/docs.Dockerfile | 9 +- app/vendor/cakephp/chronos/docs/config/all.py | 2 + app/vendor/cakephp/chronos/docs/en/index.rst | 6 +- app/vendor/cakephp/chronos/docs/fr/index.rst | 4 +- app/vendor/cakephp/chronos/docs/ja/index.rst | 6 +- app/vendor/cakephp/chronos/docs/pt/index.rst | 4 +- app/vendor/cakephp/chronos/src/Chronos.php | 18 +- .../cakephp/chronos/src/ChronosInterface.php | 54 + .../cakephp/chronos/src/ChronosInterval.php | 44 +- app/vendor/cakephp/chronos/src/Date.php | 11 +- .../cakephp/chronos/src/MutableDate.php | 11 +- .../cakephp/chronos/src/MutableDateTime.php | 36 +- .../chronos/src/Traits/ComparisonTrait.php | 72 +- .../chronos/src/Traits/FactoryTrait.php | 57 +- .../chronos/src/Traits/FrozenTimeTrait.php | 2 +- .../chronos/src/Traits/MagicPropertyTrait.php | 3 +- .../chronos/src/Traits/ModifierTrait.php | 6 +- .../chronos/src/Traits/TestingAidTrait.php | 2 +- .../debug_kit/.github/workflows/ci.yml | 91 + app/vendor/cakephp/debug_kit/.jshintrc | 84 - app/vendor/cakephp/debug_kit/.stickler.yml | 11 - app/vendor/cakephp/debug_kit/Dockerfile | 24 + app/vendor/cakephp/debug_kit/LICENSE.txt | 2 +- app/vendor/cakephp/debug_kit/README.md | 6 +- app/vendor/cakephp/debug_kit/composer.json | 25 +- .../cakephp/debug_kit/config/bootstrap.php | 5 +- .../cakephp/debug_kit/config/routes.php | 7 + app/vendor/cakephp/debug_kit/docs.Dockerfile | 24 + .../debug_kit/docs/config/__init__.py} | 0 .../cakephp/debug_kit/docs/config/all.py | 52 + app/vendor/cakephp/debug_kit/docs/en/conf.py | 9 + .../cakephp/debug_kit/docs/en/contents.rst | 5 + .../cakephp/debug_kit/docs/en/index.rst | 286 + app/vendor/cakephp/debug_kit/docs/fr/conf.py | 9 + .../cakephp/debug_kit/docs/fr/contents.rst | 5 + .../cakephp/debug_kit/docs/fr/index.rst | 239 + app/vendor/cakephp/debug_kit/docs/ja/conf.py | 9 + .../cakephp/debug_kit/docs/ja/contents.rst | 5 + .../cakephp/debug_kit/docs/ja/index.rst | 267 + app/vendor/cakephp/debug_kit/docs/pt/conf.py | 9 + .../cakephp/debug_kit/docs/pt/contents.rst | 5 + .../cakephp/debug_kit/docs/pt/index.rst | 216 + .../src/Cache/Engine/DebugEngine.php | 2 +- .../src/Controller/ComposerController.php | 23 +- .../src/Controller/DashboardController.php | 68 + .../src/Controller/DebugKitController.php | 54 + .../src/Controller/MailPreviewController.php | 24 +- .../src/Controller/PanelsController.php | 22 +- .../src/Controller/RequestsController.php | 12 +- .../src/Controller/ToolbarController.php | 21 +- .../debug_kit/src/Database/Log/DebugLog.php | 2 +- .../cakephp/debug_kit/src/DebugInclude.php | 2 +- .../cakephp/debug_kit/src/DebugTimer.php | 6 +- .../debug_kit/src/Mailer/PreviewResult.php | 4 +- .../Mailer/Transport/DebugKitTransport.php | 59 +- .../debug_kit/src/Model/Entity/Panel.php | 1 + .../src/Model/Table/LazyTableTrait.php | 33 +- .../debug_kit/src/Model/Table/PanelsTable.php | 1 - .../src/Model/Table/RequestsTable.php | 26 +- .../debug_kit/src/Panel/CachePanel.php | 8 +- .../debug_kit/src/Panel/EnvironmentPanel.php | 2 +- .../cakephp/debug_kit/src/Panel/LogPanel.php | 2 +- .../cakephp/debug_kit/src/Panel/MailPanel.php | 10 +- .../debug_kit/src/Panel/PanelRegistry.php | 2 +- .../debug_kit/src/Panel/RequestPanel.php | 5 +- .../debug_kit/src/Panel/RoutesPanel.php | 14 +- .../debug_kit/src/Panel/SqlLogPanel.php | 6 +- .../debug_kit/src/Panel/TimerPanel.php | 26 +- .../debug_kit/src/Panel/VariablesPanel.php | 40 +- .../src/Routing/Filter/DebugBarFilter.php | 2 +- .../debug_kit/src/Shell/BenchmarkShell.php | 17 +- .../debug_kit/src/Shell/WhitespaceShell.php | 2 +- .../src/Template/Dashboard/index.ctp | 26 + .../src/Template/Element/cache_panel.ctp | 1 + .../src/Template/Element/packages_panel.ctp | 1 + .../src/Template/Element/routes_panel.ctp | 23 +- .../src/Template/Layout/dashboard.ctp | 13 + .../cakephp/debug_kit/src/ToolbarService.php | 11 +- .../src/View/Helper/CredentialsHelper.php | 2 +- .../debug_kit/src/View/Helper/TidyHelper.php | 7 +- .../src/View/Helper/ToolbarHelper.php | 4 +- .../debug_kit/tests/Fixture/PanelsFixture.php | 10 +- .../tests/Fixture/RequestsFixture.php | 6 +- .../cakephp/debug_kit/webroot/css/toolbar.css | 1 + .../cakephp/debug_kit/webroot/js/toolbar.js | 22 +- .../cakephp/plugin-installer/.editorconfig | 11 - .../cakephp/plugin-installer/.gitattributes | 5 + .../cakephp/plugin-installer/.gitignore | 3 +- .../cakephp/plugin-installer/.travis.yml | 23 - .../cakephp/plugin-installer/LICENSE.txt | 2 +- app/vendor/cakephp/plugin-installer/README.md | 5 + .../cakephp/plugin-installer/composer.json | 27 +- .../cakephp/plugin-installer/phpunit.xml.dist | 20 - .../src/Installer/PluginInstaller.php | 444 +- .../cakephp/plugin-installer/src/Plugin.php | 270 + .../tests/Installer/PluginInstaller.php | 25 - .../Installer/PluginInstallerTest.php | 410 +- .../tests/TestCase/PluginTest.php | 334 + .../plugin-installer/tests/bootstrap.php | 4 - .../Installer/PluginInstallerTest.php | 42 + .../TestCase/PHPUnitAssertionCompatTrait.php | 11 + .../tests/php56/TestCase/PluginTest.php | 334 + app/vendor/composer/ClassLoader.php | 161 +- app/vendor/composer/InstalledVersions.php | 337 + app/vendor/composer/autoload_classmap.php | 5 + app/vendor/composer/autoload_files.php | 28 +- app/vendor/composer/autoload_namespaces.php | 1 - app/vendor/composer/autoload_psr4.php | 10 +- app/vendor/composer/autoload_real.php | 7 +- app/vendor/composer/autoload_static.php | 98 +- app/vendor/composer/ca-bundle/README.md | 14 +- app/vendor/composer/ca-bundle/composer.json | 16 +- app/vendor/composer/ca-bundle/res/cacert.pem | 1418 ++-- .../composer/ca-bundle/src/CaBundle.php | 99 +- app/vendor/composer/composer/.editorconfig | 11 + app/vendor/composer/composer/.gitattributes | 8 +- .../composer/composer/.github/CONTRIBUTING.md | 54 - .../composer/.github/ISSUE_TEMPLATE.md | 25 - app/vendor/composer/composer/.gitignore | 3 +- app/vendor/composer/composer/.php_cs | 58 - app/vendor/composer/composer/.travis.yml | 75 - app/vendor/composer/composer/CHANGELOG.md | 649 +- .../composer/composer/CODE_OF_CONDUCT.md | 76 + app/vendor/composer/composer/README.md | 17 +- app/vendor/composer/composer/UPGRADE-2.0.md | 111 + app/vendor/composer/composer/appveyor.yml | 29 - app/vendor/composer/composer/bin/compile | 2 +- app/vendor/composer/composer/bin/composer | 67 +- app/vendor/composer/composer/composer.json | 63 +- app/vendor/composer/composer/composer.lock | 1292 ++- app/vendor/composer/composer/doc/00-intro.md | 40 +- .../composer/composer/doc/01-basic-usage.md | 147 +- .../composer/composer/doc/02-libraries.md | 14 +- app/vendor/composer/composer/doc/03-cli.md | 489 +- app/vendor/composer/composer/doc/04-schema.md | 134 +- .../composer/composer/doc/05-repositories.md | 289 +- app/vendor/composer/composer/doc/06-config.md | 163 +- .../composer/composer/doc/07-runtime.md | 155 + .../doc/{07-community.md => 08-community.md} | 19 +- .../composer/composer/doc/articles/aliases.md | 8 +- .../authentication-for-private-packages.md | 301 + .../doc/articles/autoloader-optimization.md | 16 +- .../doc/articles/custom-installers.md | 5 +- ...-satis.md => handling-private-packages.md} | 33 +- .../doc/articles/http-basic-authentication.md | 59 - .../composer/composer/doc/articles/plugins.md | 73 +- .../doc/articles/repository-priorities.md | 95 + .../doc/articles/resolving-merge-conflicts.md | 62 + .../composer/composer/doc/articles/scripts.md | 122 +- .../composer/doc/articles/troubleshooting.md | 84 +- .../composer/doc/articles/versions.md | 36 +- ...ckage-to-a-custom-path-for-my-framework.md | 13 +- ...ow-to-install-composer-programmatically.md | 12 +- ...the-dependencies-in-my-vendor-directory.md | 2 +- ...-unbound-version-constraints-a-bad-idea.md | 4 +- ...ng-comparisons-and-wildcards-a-bad-idea.md | 4 +- ...-composer-load-repositories-recursively.md | 4 +- .../composer/doc/fixtures/fixtures.md | 15 +- ...156dd4d0821a97fd3e428bc910833e3e46dbe.json | 2 +- ...138e5f3b79029c1f8d9ab5b477ea15776ba0a.json | 2 +- ...67b9bea558b971e5b082f330ae4f1d484c321.json | 2 +- ...791c612db0c05e22d90e9286e233cacd86ed8.json | 2 +- ...d601923a5a00ccc5fcce50a77ecdd461eb72d.json | 2 +- .../packages.json | 2 +- app/vendor/composer/composer/phpunit.xml.dist | 35 - .../res/composer-repository-schema.json | 2 +- .../composer/res/composer-schema.json | 180 +- .../Composer/Autoload/AutoloadGenerator.php | 574 +- .../src/Composer/Autoload/ClassLoader.php | 159 +- .../Composer/Autoload/ClassMapGenerator.php | 143 +- .../composer/composer/src/Composer/Cache.php | 82 +- .../src/Composer/Command/AboutCommand.php | 9 +- .../src/Composer/Command/ArchiveCommand.php | 27 +- .../src/Composer/Command/BaseCommand.php | 100 +- .../Command/BaseDependencyCommand.php | 58 +- .../Command/CheckPlatformReqsCommand.php | 158 +- .../Composer/Command/ClearCacheCommand.php | 7 +- .../src/Composer/Command/ConfigCommand.php | 210 +- .../Composer/Command/CreateProjectCommand.php | 219 +- .../src/Composer/Command/DependsCommand.php | 14 +- .../src/Composer/Command/DiagnoseCommand.php | 261 +- .../Composer/Command/DumpAutoloadCommand.php | 47 +- .../src/Composer/Command/ExecCommand.php | 19 +- .../src/Composer/Command/FundCommand.php | 145 + .../src/Composer/Command/GlobalCommand.php | 11 + .../src/Composer/Command/HomeCommand.php | 6 +- .../src/Composer/Command/InitCommand.php | 423 +- .../src/Composer/Command/InstallCommand.php | 50 +- .../src/Composer/Command/LicensesCommand.php | 39 +- .../src/Composer/Command/OutdatedCommand.php | 14 +- .../src/Composer/Command/ProhibitsCommand.php | 13 +- .../src/Composer/Command/ReinstallCommand.php | 164 + .../src/Composer/Command/RemoveCommand.php | 166 +- .../src/Composer/Command/RequireCommand.php | 325 +- .../src/Composer/Command/RunScriptCommand.php | 19 +- .../Composer/Command/ScriptAliasCommand.php | 4 + .../src/Composer/Command/SearchCommand.php | 40 +- .../Composer/Command/SelfUpdateCommand.php | 272 +- .../src/Composer/Command/ShowCommand.php | 601 +- .../src/Composer/Command/StatusCommand.php | 36 +- .../src/Composer/Command/SuggestsCommand.php | 131 +- .../src/Composer/Command/UpdateCommand.php | 154 +- .../src/Composer/Command/ValidateCommand.php | 140 +- .../composer/src/Composer/Compiler.php | 119 +- .../composer/src/Composer/Composer.php | 108 +- .../composer/composer/src/Composer/Config.php | 92 +- .../Composer/Config/ConfigSourceInterface.php | 10 +- .../src/Composer/Config/JsonConfigSource.php | 57 +- .../src/Composer/Console/Application.php | 169 +- .../Composer/Console/GithubActionError.php | 50 + .../Composer/Console/HtmlOutputFormatter.php | 3 + .../Composer/DependencyResolver/Decisions.php | 46 +- .../DependencyResolver/DefaultPolicy.php | 169 +- .../DependencyResolver/GenericRule.php | 15 +- .../LocalRepoTransaction.php | 30 + .../DependencyResolver/LockTransaction.php | 148 + .../DependencyResolver/MultiConflictRule.php | 105 + .../Operation/InstallOperation.php | 30 +- .../Operation/MarkAliasInstalledOperation.php | 32 +- .../MarkAliasUninstalledOperation.php | 32 +- .../Operation/OperationInterface.php | 9 +- .../Operation/SolverOperation.php | 29 +- .../Operation/UninstallOperation.php | 30 +- .../Operation/UpdateOperation.php | 48 +- .../DependencyResolver/PolicyInterface.php | 4 +- .../src/Composer/DependencyResolver/Pool.php | 310 +- .../DependencyResolver/PoolBuilder.php | 548 ++ .../Composer/DependencyResolver/Problem.php | 456 +- .../Composer/DependencyResolver/Request.php | 183 +- .../src/Composer/DependencyResolver/Rule.php | 372 +- .../DependencyResolver/Rule2Literals.php | 20 +- .../Composer/DependencyResolver/RuleSet.php | 51 +- .../DependencyResolver/RuleSetGenerator.php | 320 +- .../DependencyResolver/RuleSetIterator.php | 23 +- .../DependencyResolver/RuleWatchChain.php | 3 +- .../DependencyResolver/RuleWatchGraph.php | 73 +- .../DependencyResolver/RuleWatchNode.php | 9 +- .../Composer/DependencyResolver/Solver.php | 337 +- .../SolverProblemsException.php | 71 +- .../DependencyResolver/Transaction.php | 390 +- .../Composer/Downloader/ArchiveDownloader.php | 209 +- .../Composer/Downloader/DownloadManager.php | 314 +- .../Downloader/DownloaderInterface.php | 60 +- .../Composer/Downloader/FileDownloader.php | 438 +- .../Composer/Downloader/FossilDownloader.php | 23 +- .../src/Composer/Downloader/GitDownloader.php | 249 +- .../Composer/Downloader/GzipDownloader.php | 32 +- .../src/Composer/Downloader/HgDownloader.php | 26 +- .../MaxFileSizeExceededException.php} | 11 +- .../Composer/Downloader/PathDownloader.php | 204 +- .../Downloader/PearPackageExtractor.php | 266 - .../Downloader/PerforceDownloader.php | 20 +- .../Composer/Downloader/PharDownloader.php | 6 +- .../src/Composer/Downloader/RarDownloader.php | 22 +- .../src/Composer/Downloader/SvnDownloader.php | 49 +- .../src/Composer/Downloader/TarDownloader.php | 6 +- .../Downloader/TransportException.php | 21 + .../src/Composer/Downloader/VcsDownloader.php | 208 +- .../src/Composer/Downloader/XzDownloader.php | 26 +- .../src/Composer/Downloader/ZipDownloader.php | 195 +- .../src/Composer/EventDispatcher/Event.php | 14 +- .../EventDispatcher/EventDispatcher.php | 437 +- .../IrrecoverableDownloadException.php} | 8 +- .../src/Composer/Exception/NoSslException.php | 2 + .../composer/src/Composer/Factory.php | 255 +- .../composer/src/Composer/IO/BaseIO.php | 127 +- .../composer/src/Composer/IO/BufferIO.php | 34 +- .../composer/src/Composer/IO/ConsoleIO.php | 45 +- .../composer/src/Composer/IO/IOInterface.php | 27 +- .../composer/src/Composer/IO/NullIO.php | 2 +- .../src/Composer/InstalledVersions.php | 337 + .../composer/src/Composer/Installer.php | 1467 ++-- .../Composer/Installer/BinaryInstaller.php | 68 +- .../Installer/InstallationManager.php | 469 +- .../src/Composer/Installer/InstallerEvent.php | 96 +- .../Composer/Installer/InstallerEvents.php | 25 +- .../Composer/Installer/InstallerInterface.php | 61 +- .../Composer/Installer/LibraryInstaller.php | 141 +- .../Installer/MetapackageInstaller.php | 51 + .../src/Composer/Installer/NoopInstaller.php | 30 + .../src/Composer/Installer/PackageEvent.php | 89 +- .../Installer/PearBinaryInstaller.php | 144 - .../src/Composer/Installer/PearInstaller.php | 84 - .../Composer/Installer/PluginInstaller.php | 81 +- .../Composer/Installer/ProjectInstaller.php | 36 +- .../Installer/SuggestedPackagesReporter.php | 124 +- .../composer/src/Composer/Json/JsonFile.php | 80 +- .../src/Composer/Json/JsonFormatter.php | 3 +- .../src/Composer/Json/JsonManipulator.php | 91 +- .../Composer/Json/JsonValidationException.php | 12 +- .../src/Composer/Package/AliasPackage.php | 117 +- .../Archiver/ArchivableFilesFilter.php | 1 + .../Archiver/ArchivableFilesFinder.php | 5 +- .../Package/Archiver/ArchiveManager.php | 74 +- .../Package/Archiver/BaseExcludeFilter.php | 27 +- .../Package/Archiver/GitExcludeFilter.php | 2 +- .../Package/Archiver/HgExcludeFilter.php | 2 +- .../Package/Archiver/PharArchiver.php | 7 +- .../Composer/Package/Archiver/ZipArchiver.php | 20 +- .../src/Composer/Package/BasePackage.php | 90 +- .../Composer/Package/Comparer/Comparer.php | 12 +- .../Composer/Package/CompleteAliasPackage.php | 167 + .../src/Composer/Package/CompletePackage.php | 99 +- .../Package/CompletePackageInterface.php | 131 +- .../Composer/Package/Dumper/ArrayDumper.php | 38 +- .../composer/src/Composer/Package/Link.php | 62 +- .../LinkConstraint/EmptyConstraint.php | 24 - .../LinkConstraintInterface.php | 24 - .../LinkConstraint/MultiConstraint.php | 24 - .../LinkConstraint/SpecificConstraint.php | 24 - .../LinkConstraint/VersionConstraint.php | 24 - .../Composer/Package/Loader/ArrayLoader.php | 317 +- .../Composer/Package/Loader/JsonLoader.php | 11 +- .../Package/Loader/RootPackageLoader.php | 70 +- .../Package/Loader/ValidatingArrayLoader.php | 155 +- .../composer/src/Composer/Package/Locker.php | 120 +- .../composer/src/Composer/Package/Package.php | 119 +- .../src/Composer/Package/PackageInterface.php | 128 +- .../src/Composer/Package/RootAliasPackage.php | 80 +- .../src/Composer/Package/RootPackage.php | 26 +- .../Composer/Package/RootPackageInterface.php | 37 +- .../Package/Version/StabilityFilter.php | 49 + .../Package/Version/VersionGuesser.php | 137 +- .../Package/Version/VersionParser.php | 17 +- .../Package/Version/VersionSelector.php | 80 +- .../src/Composer/Platform/HhvmDetector.php | 65 + .../src/Composer/Platform/Runtime.php | 109 + .../src/Composer/Platform/Version.php | 104 + .../src/Composer/Plugin/PluginEvents.php | 21 + .../src/Composer/Plugin/PluginInterface.php | 29 +- .../src/Composer/Plugin/PluginManager.php | 275 +- .../Composer/Plugin/PostFileDownloadEvent.php | 147 + .../Composer/Plugin/PreFileDownloadEvent.php | 127 +- .../Composer/Plugin/PrePoolCreateEvent.php | 175 + .../Question/StrictConfirmationQuestion.php | 2 + .../Composer/Repository/ArrayRepository.php | 129 +- .../Repository/ArtifactRepository.php | 94 +- .../Repository/ComposerRepository.php | 1122 ++- .../Repository/CompositeRepository.php | 53 +- .../Repository/FilesystemRepository.php | 225 +- .../Composer/Repository/FilterRepository.php | 206 + .../Repository/InstalledArrayRepository.php | 16 +- .../InstalledFilesystemRepository.php | 12 + ...Repository.php => InstalledRepository.php} | 127 +- .../InstalledRepositoryInterface.php | 4 + .../Repository/LockArrayRepository.php | 28 + .../Composer/Repository/PackageRepository.php | 6 + .../Composer/Repository/PathRepository.php | 63 +- .../Repository/Pear/BaseChannelReader.php | 82 - .../Composer/Repository/Pear/ChannelInfo.php | 67 - .../Repository/Pear/ChannelReader.php | 101 - .../Repository/Pear/ChannelRest10Reader.php | 164 - .../Repository/Pear/ChannelRest11Reader.php | 139 - .../Repository/Pear/DependencyConstraint.php | 60 - .../Repository/Pear/DependencyInfo.php | 50 - .../Pear/PackageDependencyParser.php | 317 - .../Composer/Repository/Pear/PackageInfo.php | 94 - .../Composer/Repository/Pear/ReleaseInfo.php | 50 - .../Composer/Repository/PearRepository.php | 176 +- .../Repository/PlatformRepository.php | 492 +- .../Composer/Repository/RepositoryFactory.php | 44 +- .../Repository/RepositoryInterface.php | 58 +- .../Composer/Repository/RepositoryManager.php | 42 +- .../src/Composer/Repository/RepositorySet.php | 329 + .../Repository/RootPackageRepository.php | 35 + .../Repository/Vcs/BitbucketDriver.php | 175 +- .../Composer/Repository/Vcs/FossilDriver.php | 26 +- .../Repository/Vcs/GitBitbucketDriver.php | 12 +- .../src/Composer/Repository/Vcs/GitDriver.php | 35 +- .../Composer/Repository/Vcs/GitHubDriver.php | 237 +- .../Composer/Repository/Vcs/GitLabDriver.php | 210 +- .../Repository/Vcs/HgBitbucketDriver.php | 12 +- .../src/Composer/Repository/Vcs/HgDriver.php | 25 +- .../Repository/Vcs/PerforceDriver.php | 18 +- .../src/Composer/Repository/Vcs/SvnDriver.php | 35 +- .../src/Composer/Repository/Vcs/VcsDriver.php | 37 +- .../Repository/Vcs/VcsDriverInterface.php | 14 +- .../src/Composer/Repository/VcsRepository.php | 253 +- .../Repository/VersionCacheInterface.php | 23 + .../Repository/WritableArrayRepository.php | 24 +- .../WritableRepositoryInterface.php | 15 +- .../composer/src/Composer/Script/Event.php | 43 + .../src/Composer/Script/ScriptEvents.php | 62 - .../src/Composer/SelfUpdate/Versions.php | 47 +- .../composer/src/Composer/Util/AuthHelper.php | 216 +- .../composer/src/Composer/Util/Bitbucket.php | 66 +- .../src/Composer/Util/ComposerMirror.php | 15 +- .../src/Composer/Util/ConfigValidator.php | 27 +- .../src/Composer/Util/ErrorHandler.php | 17 +- .../composer/src/Composer/Util/Filesystem.php | 344 +- .../composer/src/Composer/Util/Git.php | 162 +- .../composer/src/Composer/Util/GitHub.php | 22 +- .../composer/src/Composer/Util/GitLab.php | 62 +- .../composer/src/Composer/Util/Hg.php | 33 +- .../src/Composer/Util/Http/CurlDownloader.php | 607 ++ .../src/Composer/Util/Http/CurlResponse.php | 42 + .../src/Composer/Util/Http/ProxyHelper.php | 183 + .../src/Composer/Util/Http/ProxyManager.php | 188 + .../src/Composer/Util/Http/RequestProxy.php | 91 + .../src/Composer/Util/Http/Response.php | 133 + .../src/Composer/Util/HttpDownloader.php | 538 ++ .../composer/src/Composer/Util/IniHelper.php | 2 +- .../composer/src/Composer/Util/Loop.php | 135 + .../src/Composer/Util/MetadataMinifier.php | 22 + .../src/Composer/Util/NoProxyPattern.php | 434 +- .../src/Composer/Util/PackageSorter.php | 102 + .../composer/src/Composer/Util/Perforce.php | 69 +- .../composer/src/Composer/Util/Platform.php | 148 +- .../src/Composer/Util/ProcessExecutor.php | 363 +- .../src/Composer/Util/RemoteFilesystem.php | 583 +- .../composer/src/Composer/Util/Silencer.php | 2 + .../src/Composer/Util/SpdxLicense.php | 24 - .../Composer/Util/StreamContextFactory.php | 253 +- .../composer/src/Composer/Util/Svn.php | 34 +- .../composer/src/Composer/Util/SyncHelper.php | 70 + .../composer/src/Composer/Util/Tar.php | 68 + .../composer/src/Composer/Util/TlsHelper.php | 15 +- .../composer/src/Composer/Util/Url.php | 72 + .../composer/src/Composer/Util/Zip.php | 109 + .../composer/src/Composer/XdebugHandler.php | 31 - .../composer/composer/src/bootstrap.php | 6 +- app/vendor/composer/installed.json | 6968 ++++++++++------- app/vendor/composer/installed.php | 623 ++ app/vendor/composer/metadata-minifier/LICENSE | 19 + .../composer/metadata-minifier/README.md | 37 + .../composer/metadata-minifier/composer.json | 47 + .../metadata-minifier/phpstan.neon.dist | 5 + .../src/MetadataMinifier.php | 89 + app/vendor/composer/semver/CHANGELOG.md | 106 + app/vendor/composer/semver/README.md | 36 +- app/vendor/composer/semver/composer.json | 11 +- app/vendor/composer/semver/src/Comparator.php | 4 +- .../composer/semver/src/CompilingMatcher.php | 71 + .../src/Constraint/AbstractConstraint.php | 63 - .../composer/semver/src/Constraint/Bound.php | 122 + .../semver/src/Constraint/Constraint.php | 288 +- .../src/Constraint/ConstraintInterface.php | 43 + ...yConstraint.php => MatchAllConstraint.php} | 40 +- .../src/Constraint/MatchNoneConstraint.php | 83 + .../semver/src/Constraint/MultiConstraint.php | 225 +- app/vendor/composer/semver/src/Interval.php | 98 + app/vendor/composer/semver/src/Intervals.php | 478 ++ app/vendor/composer/semver/src/Semver.php | 28 +- .../composer/semver/src/VersionParser.php | 211 +- .../composer/spdx-licenses/.php_cs.dist | 59 - .../composer/spdx-licenses/CHANGELOG.md | 40 + app/vendor/composer/spdx-licenses/README.md | 2 +- .../composer/spdx-licenses/composer.json | 7 +- .../spdx-licenses/res/spdx-exceptions.json | 36 + .../spdx-licenses/res/spdx-licenses.json | 395 +- .../composer/xdebug-handler/CHANGELOG.md | 68 +- app/vendor/composer/xdebug-handler/README.md | 97 +- app/vendor/composer/xdebug-handler/UPGRADE.md | 30 + .../composer/xdebug-handler/composer.json | 12 +- .../composer/xdebug-handler/src/PhpConfig.php | 19 +- .../composer/xdebug-handler/src/Process.php | 92 +- .../composer/xdebug-handler/src/Status.php | 16 +- .../xdebug-handler/src/XdebugHandler.php | 218 +- .../dnoegel/php-xdg-base-dir/.gitignore | 1 - app/vendor/dnoegel/php-xdg-base-dir/README.md | 38 - .../dnoegel/php-xdg-base-dir/composer.json | 17 - .../dnoegel/php-xdg-base-dir/phpunit.xml.dist | 24 - .../dnoegel/php-xdg-base-dir/src/Xdg.php | 121 - .../php-xdg-base-dir/tests/XdgTest.php | 116 - app/vendor/doctrine/cache/README.md | 11 +- app/vendor/doctrine/cache/UPGRADE-1.11.md | 15 + .../cache/{UPGRADE.md => UPGRADE-1.4.md} | 0 app/vendor/doctrine/cache/composer.json | 31 +- app/vendor/doctrine/cache/docs/en/index.rst | 274 - .../lib/Doctrine/Common/Cache/ApcCache.php | 104 - .../lib/Doctrine/Common/Cache/ApcuCache.php | 106 - .../lib/Doctrine/Common/Cache/ArrayCache.php | 113 - .../cache/lib/Doctrine/Common/Cache/Cache.php | 2 +- .../Doctrine/Common/Cache/CacheProvider.php | 22 +- .../lib/Doctrine/Common/Cache/ChainCache.php | 186 - .../Common/Cache/CouchbaseBucketCache.php | 195 - .../Doctrine/Common/Cache/CouchbaseCache.php | 102 - .../Doctrine/Common/Cache/ExtMongoDBCache.php | 196 - .../lib/Doctrine/Common/Cache/FileCache.php | 276 - .../Doctrine/Common/Cache/FilesystemCache.php | 102 - .../Common/Cache/LegacyMongoDBCache.php | 174 - .../Doctrine/Common/Cache/MemcacheCache.php | 102 - .../Doctrine/Common/Cache/MemcachedCache.php | 130 - .../Doctrine/Common/Cache/MongoDBCache.php | 110 - .../Common/Cache/MultiDeleteCache.php | 3 +- .../Doctrine/Common/Cache/MultiGetCache.php | 4 +- .../Doctrine/Common/Cache/MultiPutCache.php | 9 +- .../Doctrine/Common/Cache/PhpFileCache.php | 118 - .../lib/Doctrine/Common/Cache/PredisCache.php | 143 - .../Common/Cache/Psr6/CacheAdapter.php | 340 + .../Doctrine/Common/Cache/Psr6/CacheItem.php | 118 + .../Common/Cache/Psr6/DoctrineProvider.php | 125 + .../Common/Cache/Psr6/InvalidArgument.php | 13 + .../Common/Cache/Psr6/TypedCacheItem.php | 99 + .../lib/Doctrine/Common/Cache/RedisCache.php | 175 - .../lib/Doctrine/Common/Cache/RiakCache.php | 228 - .../Doctrine/Common/Cache/SQLite3Cache.php | 206 - .../lib/Doctrine/Common/Cache/Version.php | 8 - .../lib/Doctrine/Common/Cache/VoidCache.php | 59 - .../Doctrine/Common/Cache/WinCacheCache.php | 106 - .../lib/Doctrine/Common/Cache/XcacheCache.php | 102 - .../Doctrine/Common/Cache/ZendDataCache.php | 68 - .../doctrine/dbal/.doctrine-project.json | 49 - app/vendor/doctrine/dbal/CONTRIBUTING.md | 4 + app/vendor/doctrine/dbal/README.md | 63 +- app/vendor/doctrine/dbal/SECURITY.md | 14 - app/vendor/doctrine/dbal/UPGRADE.md | 359 - .../doctrine/dbal/bin/doctrine-dbal.php | 18 +- app/vendor/doctrine/dbal/composer.json | 49 +- .../lib/Doctrine/DBAL/Abstraction/Result.php | 45 + .../Doctrine/DBAL/Cache/ArrayStatement.php | 111 +- .../Doctrine/DBAL/Cache/CacheException.php | 11 +- .../Doctrine/DBAL/Cache/QueryCacheProfile.php | 20 +- .../DBAL/Cache/ResultCacheStatement.php | 216 +- .../dbal/lib/Doctrine/DBAL/ColumnCase.php | 2 + .../dbal/lib/Doctrine/DBAL/Configuration.php | 37 +- .../dbal/lib/Doctrine/DBAL/Connection.php | 1089 ++- .../lib/Doctrine/DBAL/ConnectionException.php | 13 +- .../Connections/MasterSlaveConnection.php | 370 +- .../PrimaryReadReplicaConnection.php | 442 ++ .../dbal/lib/Doctrine/DBAL/DBALException.php | 127 +- .../dbal/lib/Doctrine/DBAL/Driver.php | 6 + .../DBAL/Driver/AbstractDB2Driver.php | 16 +- .../DBAL/Driver/AbstractDriverException.php | 50 +- .../DBAL/Driver/AbstractException.php | 68 + .../DBAL/Driver/AbstractMySQLDriver.php | 108 +- .../DBAL/Driver/AbstractOracleDriver.php | 40 +- .../EasyConnectString.php | 10 +- .../DBAL/Driver/AbstractPostgreSQLDriver.php | 73 +- .../DBAL/Driver/AbstractSQLAnywhereDriver.php | 87 +- .../DBAL/Driver/AbstractSQLServerDriver.php | 44 +- .../Exception/PortWithoutHost.php | 20 + .../DBAL/Driver/AbstractSQLiteDriver.php | 50 +- .../lib/Doctrine/DBAL/Driver/Connection.php | 16 +- .../Doctrine/DBAL/Driver/DriverException.php | 34 +- .../Driver/DrizzlePDOMySql/Connection.php | 3 + .../DBAL/Driver/DrizzlePDOMySql/Driver.php | 8 + .../lib/Doctrine/DBAL/Driver/Exception.php | 34 + .../DBAL/Driver/ExceptionConverterDriver.php | 17 +- .../lib/Doctrine/DBAL/Driver/FetchUtils.php | 75 + .../DBAL/Driver/IBMDB2/Connection.php | 7 + .../DBAL/Driver/IBMDB2/DB2Connection.php | 90 +- .../Doctrine/DBAL/Driver/IBMDB2/DB2Driver.php | 40 +- .../DBAL/Driver/IBMDB2/DB2Exception.php | 9 +- .../DBAL/Driver/IBMDB2/DB2Statement.php | 182 +- .../DBAL/Driver/IBMDB2/DataSourceName.php | 77 + .../Doctrine/DBAL/Driver/IBMDB2/Driver.php | 9 + .../Exception/CannotCopyStreamToStream.php | 29 + .../Exception/CannotCreateTemporaryFile.php | 29 + .../Exception/CannotWriteToTemporaryFile.php | 29 + .../IBMDB2/Exception/ConnectionError.php | 26 + .../IBMDB2/Exception/ConnectionFailed.php | 23 + .../Driver/IBMDB2/Exception/PrepareFailed.php | 27 + .../IBMDB2/Exception/StatementError.php | 26 + .../Doctrine/DBAL/Driver/IBMDB2/Statement.php | 7 + .../DBAL/Driver/Mysqli/Connection.php | 7 + .../Doctrine/DBAL/Driver/Mysqli/Driver.php | 13 +- .../Mysqli/Exception/ConnectionError.php | 21 + .../Mysqli/Exception/ConnectionFailed.php | 21 + .../Exception/FailedReadingStreamOffset.php | 22 + .../Driver/Mysqli/Exception/InvalidOption.php | 28 + .../Mysqli/Exception/StatementError.php | 21 + .../Driver/Mysqli/Exception/UnknownType.php | 25 + .../DBAL/Driver/Mysqli/MysqliConnection.php | 106 +- .../DBAL/Driver/Mysqli/MysqliException.php | 4 +- .../DBAL/Driver/Mysqli/MysqliStatement.php | 258 +- .../Doctrine/DBAL/Driver/Mysqli/Statement.php | 7 + .../Doctrine/DBAL/Driver/OCI8/Connection.php | 7 + .../lib/Doctrine/DBAL/Driver/OCI8/Driver.php | 26 +- .../Exception/NonTerminatedStringLiteral.php | 27 + .../OCI8/Exception/SequenceDoesNotExist.php | 20 + .../OCI8/Exception/UnknownParameterIndex.php | 24 + .../DBAL/Driver/OCI8/OCI8Connection.php | 105 +- .../DBAL/Driver/OCI8/OCI8Exception.php | 13 +- .../DBAL/Driver/OCI8/OCI8Statement.php | 262 +- .../Doctrine/DBAL/Driver/OCI8/Statement.php | 7 + .../Doctrine/DBAL/Driver/PDO/Connection.php | 9 + .../Doctrine/DBAL/Driver/PDO/Exception.php | 20 + .../Doctrine/DBAL/Driver/PDO/MySQL/Driver.php | 9 + .../Doctrine/DBAL/Driver/PDO/OCI/Driver.php | 9 + .../Doctrine/DBAL/Driver/PDO/PgSQL/Driver.php | 9 + .../DBAL/Driver/PDO/SQLSrv/Connection.php | 9 + .../DBAL/Driver/PDO/SQLSrv/Driver.php | 9 + .../DBAL/Driver/PDO/SQLSrv/Statement.php | 9 + .../DBAL/Driver/PDO/SQLite/Driver.php | 9 + .../Doctrine/DBAL/Driver/PDO/Statement.php | 9 + .../Doctrine/DBAL/Driver/PDOConnection.php | 117 +- .../lib/Doctrine/DBAL/Driver/PDOException.php | 14 +- .../Doctrine/DBAL/Driver/PDOIbm/Driver.php | 17 +- .../Doctrine/DBAL/Driver/PDOMySql/Driver.php | 23 +- .../Doctrine/DBAL/Driver/PDOOracle/Driver.php | 20 +- .../Doctrine/DBAL/Driver/PDOPgSql/Driver.php | 30 +- .../DBAL/Driver/PDOQueryImplementation.php | 41 + .../Doctrine/DBAL/Driver/PDOSqlite/Driver.php | 20 +- .../DBAL/Driver/PDOSqlsrv/Connection.php | 37 +- .../Doctrine/DBAL/Driver/PDOSqlsrv/Driver.php | 63 +- .../DBAL/Driver/PDOSqlsrv/Statement.php | 29 +- .../lib/Doctrine/DBAL/Driver/PDOStatement.php | 259 +- .../Driver/PDOStatementImplementations.php | 77 + .../DBAL/Driver/PingableConnection.php | 2 + .../dbal/lib/Doctrine/DBAL/Driver/Result.php | 89 + .../Doctrine/DBAL/Driver/ResultStatement.php | 46 +- .../DBAL/Driver/SQLAnywhere/Driver.php | 47 +- .../SQLAnywhere/SQLAnywhereConnection.php | 55 +- .../SQLAnywhere/SQLAnywhereException.php | 14 +- .../SQLAnywhere/SQLAnywhereStatement.php | 133 +- .../DBAL/Driver/SQLSrv/Connection.php | 7 + .../Doctrine/DBAL/Driver/SQLSrv/Driver.php | 27 +- .../DBAL/Driver/SQLSrv/Exception/Error.php | 47 + .../DBAL/Driver/SQLSrv/LastInsertId.php | 4 + .../DBAL/Driver/SQLSrv/SQLSrvConnection.php | 76 +- .../DBAL/Driver/SQLSrv/SQLSrvException.php | 35 +- .../DBAL/Driver/SQLSrv/SQLSrvStatement.php | 196 +- .../Doctrine/DBAL/Driver/SQLSrv/Statement.php | 7 + .../DBAL/Driver/ServerInfoAwareConnection.php | 2 + .../lib/Doctrine/DBAL/Driver/Statement.php | 36 +- .../DBAL/Driver/StatementIterator.php | 9 +- .../dbal/lib/Doctrine/DBAL/DriverManager.php | 277 +- .../DBAL/Event/ConnectionEventArgs.php | 30 +- .../DBAL/Event/Listeners/MysqlSessionInit.php | 2 +- .../Event/Listeners/OracleSessionInit.php | 10 +- .../SchemaAlterTableAddColumnEventArgs.php | 20 +- .../SchemaAlterTableChangeColumnEventArgs.php | 14 +- .../DBAL/Event/SchemaAlterTableEventArgs.php | 14 +- .../SchemaAlterTableRemoveColumnEventArgs.php | 14 +- .../SchemaAlterTableRenameColumnEventArgs.php | 14 +- .../Event/SchemaColumnDefinitionEventArgs.php | 16 +- .../SchemaCreateTableColumnEventArgs.php | 14 +- .../DBAL/Event/SchemaCreateTableEventArgs.php | 23 +- .../DBAL/Event/SchemaDropTableEventArgs.php | 11 +- .../Doctrine/DBAL/Event/SchemaEventArgs.php | 2 +- .../Event/SchemaIndexDefinitionEventArgs.php | 14 +- .../dbal/lib/Doctrine/DBAL/Events.php | 2 + .../dbal/lib/Doctrine/DBAL/Exception.php | 10 + .../DBAL/Exception/ConnectionException.php | 2 + .../DBAL/Exception/ConnectionLost.php | 10 + .../ConstraintViolationException.php | 2 + .../DatabaseObjectExistsException.php | 2 + .../DatabaseObjectNotFoundException.php | 2 + .../DBAL/Exception/DeadlockException.php | 2 + .../DBAL/Exception/DriverException.php | 24 +- ...ForeignKeyConstraintViolationException.php | 2 + .../Exception/InvalidArgumentException.php | 6 +- .../Exception/InvalidFieldNameException.php | 2 + .../Exception/LockWaitTimeoutException.php | 2 + .../Doctrine/DBAL/Exception/NoKeyValue.php | 25 + .../Exception/NonUniqueFieldNameException.php | 2 + .../NotNullConstraintViolationException.php | 2 + .../DBAL/Exception/ReadOnlyException.php | 2 + .../DBAL/Exception/RetryableException.php | 6 +- .../DBAL/Exception/ServerException.php | 2 + .../DBAL/Exception/SyntaxErrorException.php | 2 + .../DBAL/Exception/TableExistsException.php | 2 + .../DBAL/Exception/TableNotFoundException.php | 2 + .../UniqueConstraintViolationException.php | 2 + .../dbal/lib/Doctrine/DBAL/FetchMode.php | 4 + .../DriverResultStatement.php | 9 + .../ForwardCompatibility/DriverStatement.php | 9 + .../DBAL/ForwardCompatibility/Result.php | 416 + .../lib/Doctrine/DBAL/Id/TableGenerator.php | 61 +- .../dbal/lib/Doctrine/DBAL/LockMode.php | 2 + .../lib/Doctrine/DBAL/Logging/DebugStack.php | 12 +- .../Doctrine/DBAL/Logging/EchoSQLLogger.php | 16 +- .../lib/Doctrine/DBAL/Logging/LoggerChain.php | 18 + .../lib/Doctrine/DBAL/Logging/SQLLogger.php | 8 +- .../dbal/lib/Doctrine/DBAL/ParameterType.php | 7 + .../DBAL/Platforms/AbstractPlatform.php | 738 +- .../Doctrine/DBAL/Platforms/DB2Platform.php | 165 +- .../DBAL/Platforms/DateIntervalUnit.php | 3 + .../DBAL/Platforms/DrizzlePlatform.php | 108 +- .../DBAL/Platforms/Keywords/KeywordList.php | 2 +- .../Platforms/Keywords/MariaDb102Keywords.php | 7 +- .../Platforms/Keywords/MySQL80Keywords.php | 3 + .../Keywords/PostgreSQL100Keywords.php | 5 +- .../Keywords/ReservedKeywordsValidator.php | 1 + .../DBAL/Platforms/MariaDb1027Platform.php | 16 +- .../DBAL/Platforms/MySQL57Platform.php | 6 +- .../Doctrine/DBAL/Platforms/MySqlPlatform.php | 214 +- .../DBAL/Platforms/OraclePlatform.php | 203 +- .../DBAL/Platforms/PostgreSQL100Platform.php | 10 +- .../DBAL/Platforms/PostgreSQL91Platform.php | 6 +- .../DBAL/Platforms/PostgreSQL92Platform.php | 15 +- .../DBAL/Platforms/PostgreSQL94Platform.php | 8 +- .../DBAL/Platforms/PostgreSqlPlatform.php | 174 +- .../DBAL/Platforms/SQLAnywhere11Platform.php | 2 + .../DBAL/Platforms/SQLAnywhere12Platform.php | 8 +- .../DBAL/Platforms/SQLAnywhere16Platform.php | 2 + .../DBAL/Platforms/SQLAnywherePlatform.php | 157 +- .../DBAL/Platforms/SQLAzurePlatform.php | 2 + .../DBAL/Platforms/SQLServer2005Platform.php | 4 +- .../DBAL/Platforms/SQLServer2008Platform.php | 15 +- .../DBAL/Platforms/SQLServer2012Platform.php | 52 +- .../DBAL/Platforms/SQLServerPlatform.php | 305 +- .../DBAL/Platforms/SqlitePlatform.php | 374 +- .../lib/Doctrine/DBAL/Platforms/TrimMode.php | 3 + .../Doctrine/DBAL/Portability/Connection.php | 59 +- .../DBAL/Portability/OptimizeFlags.php | 44 + .../Doctrine/DBAL/Portability/Statement.php | 217 +- .../Query/Expression/CompositeExpression.php | 70 +- .../Query/Expression/ExpressionBuilder.php | 58 +- .../lib/Doctrine/DBAL/Query/QueryBuilder.php | 263 +- .../Doctrine/DBAL/Query/QueryException.php | 12 +- .../dbal/lib/Doctrine/DBAL/Result.php | 52 + .../dbal/lib/Doctrine/DBAL/SQLParserUtils.php | 126 +- .../Doctrine/DBAL/SQLParserUtilsException.php | 16 +- .../Doctrine/DBAL/Schema/AbstractAsset.php | 9 +- .../DBAL/Schema/AbstractSchemaManager.php | 155 +- .../dbal/lib/Doctrine/DBAL/Schema/Column.php | 30 +- .../lib/Doctrine/DBAL/Schema/ColumnDiff.php | 10 +- .../lib/Doctrine/DBAL/Schema/Comparator.php | 144 +- .../Doctrine/DBAL/Schema/DB2SchemaManager.php | 73 +- .../DBAL/Schema/DrizzleSchemaManager.php | 1 + .../DBAL/Schema/ForeignKeyConstraint.php | 58 +- .../dbal/lib/Doctrine/DBAL/Schema/Index.php | 47 +- .../DBAL/Schema/MySqlSchemaManager.php | 102 +- .../DBAL/Schema/OracleSchemaManager.php | 69 +- .../DBAL/Schema/PostgreSqlSchemaManager.php | 107 +- .../DBAL/Schema/SQLAnywhereSchemaManager.php | 22 +- .../DBAL/Schema/SQLServerSchemaManager.php | 106 +- .../dbal/lib/Doctrine/DBAL/Schema/Schema.php | 131 +- .../lib/Doctrine/DBAL/Schema/SchemaDiff.php | 4 +- .../Doctrine/DBAL/Schema/SchemaException.php | 50 +- .../lib/Doctrine/DBAL/Schema/Sequence.php | 20 +- .../DBAL/Schema/SqliteSchemaManager.php | 190 +- .../AbstractSchemaSynchronizer.php | 13 + .../Synchronizer/SchemaSynchronizer.php | 2 + .../SingleDatabaseSynchronizer.php | 11 +- .../dbal/lib/Doctrine/DBAL/Schema/Table.php | 311 +- .../lib/Doctrine/DBAL/Schema/TableDiff.php | 20 +- .../Visitor/CreateSchemaSqlCollector.php | 5 +- .../Schema/Visitor/DropSchemaSqlCollector.php | 18 +- .../Doctrine/DBAL/Schema/Visitor/Graphviz.php | 29 +- .../DBAL/Schema/Visitor/NamespaceVisitor.php | 2 + .../Schema/Visitor/RemoveNamespacedAssets.php | 15 +- .../DBAL/Schema/Visitor/SchemaDiffVisitor.php | 11 + .../DBAL/Sharding/PoolingShardConnection.php | 45 +- .../DBAL/Sharding/PoolingShardManager.php | 11 +- .../SQLAzureFederationsSynchronizer.php | 34 +- .../SQLAzure/SQLAzureShardManager.php | 20 +- .../SQLAzure/Schema/MultiTenantVisitor.php | 4 + .../ShardChoser/MultiTenantShardChoser.php | 2 + .../DBAL/Sharding/ShardChoser/ShardChoser.php | 2 + .../Doctrine/DBAL/Sharding/ShardManager.php | 4 +- .../DBAL/Sharding/ShardingException.php | 20 +- .../dbal/lib/Doctrine/DBAL/Statement.php | 590 +- .../Tools/Console/Command/ImportCommand.php | 34 +- .../Console/Command/ReservedWordsCommand.php | 95 +- .../Tools/Console/Command/RunSqlCommand.php | 67 +- .../DBAL/Tools/Console/ConnectionNotFound.php | 9 + .../DBAL/Tools/Console/ConnectionProvider.php | 15 + .../SingleConnectionProvider.php | 38 + .../DBAL/Tools/Console/ConsoleRunner.php | 58 +- .../Tools/Console/Helper/ConnectionHelper.php | 2 + .../dbal/lib/Doctrine/DBAL/Tools/Dumper.php | 28 +- .../DBAL/TransactionIsolationLevel.php | 3 + .../lib/Doctrine/DBAL/Types/ArrayType.php | 9 +- .../Doctrine/DBAL/Types/AsciiStringType.php | 32 + .../lib/Doctrine/DBAL/Types/BigIntType.php | 6 +- .../lib/Doctrine/DBAL/Types/BinaryType.php | 11 +- .../dbal/lib/Doctrine/DBAL/Types/BlobType.php | 11 +- .../lib/Doctrine/DBAL/Types/BooleanType.php | 6 +- .../DBAL/Types/ConversionException.php | 38 +- .../Doctrine/DBAL/Types/DateImmutableType.php | 2 +- .../Doctrine/DBAL/Types/DateIntervalType.php | 9 +- .../DBAL/Types/DateTimeImmutableType.php | 3 +- .../lib/Doctrine/DBAL/Types/DateTimeType.php | 13 +- .../DBAL/Types/DateTimeTzImmutableType.php | 2 +- .../Doctrine/DBAL/Types/DateTimeTzType.php | 12 +- .../dbal/lib/Doctrine/DBAL/Types/DateType.php | 12 +- .../lib/Doctrine/DBAL/Types/DecimalType.php | 6 +- .../lib/Doctrine/DBAL/Types/FloatType.php | 6 +- .../dbal/lib/Doctrine/DBAL/Types/GuidType.php | 6 +- .../lib/Doctrine/DBAL/Types/IntegerType.php | 6 +- .../lib/Doctrine/DBAL/Types/JsonArrayType.php | 3 +- .../dbal/lib/Doctrine/DBAL/Types/JsonType.php | 10 +- .../lib/Doctrine/DBAL/Types/ObjectType.php | 9 +- .../Doctrine/DBAL/Types/SimpleArrayType.php | 7 +- .../lib/Doctrine/DBAL/Types/SmallIntType.php | 6 +- .../lib/Doctrine/DBAL/Types/StringType.php | 6 +- .../dbal/lib/Doctrine/DBAL/Types/TextType.php | 7 +- .../Doctrine/DBAL/Types/TimeImmutableType.php | 2 +- .../dbal/lib/Doctrine/DBAL/Types/TimeType.php | 12 +- .../dbal/lib/Doctrine/DBAL/Types/Type.php | 277 +- .../lib/Doctrine/DBAL/Types/TypeRegistry.php | 125 + .../dbal/lib/Doctrine/DBAL/Types/Types.php | 47 + .../DBAL/Types/VarDateTimeImmutableType.php | 3 +- .../Doctrine/DBAL/Types/VarDateTimeType.php | 1 + .../dbal/lib/Doctrine/DBAL/Version.php | 8 +- .../DBAL/VersionAwarePlatformDriver.php | 2 +- .../deprecations/.github/workflows/ci.yml | 60 + .../deprecations}/.gitignore | 2 +- app/vendor/doctrine/deprecations/README.md | 147 + .../doctrine/deprecations/composer.json | 27 + .../lib/Doctrine/Deprecations/Deprecation.php | 266 + .../PHPUnit/VerifyDeprecations.php | 66 + app/vendor/doctrine/deprecations/phpcs.xml | 20 + .../doctrine/deprecations/phpunit.xml.dist | 8 + .../deprecations/test_fixtures/src/Foo.php | 22 + .../test_fixtures/src/RootDeprecation.php | 20 + .../Doctrine/Deprecations/DeprecationTest.php | 251 + .../Deprecations/VerifyDeprecationsTest.php | 35 + .../event-manager/.doctrine-project.json | 18 + .../doctrine/event-manager/.scrutinizer.yml | 29 - .../doctrine/event-manager/composer.json | 19 +- .../doctrine/event-manager/docs/en/index.rst | 22 - .../event-manager/docs/en/reference/index.rst | 133 - .../event-manager/docs/en/sidebar.rst | 4 - .../lib/Doctrine/Common/EventArgs.php | 3 +- .../lib/Doctrine/Common/EventManager.php | 1 + .../php-console-color/.gitignore | 3 - .../php-console-color/.travis.yml | 24 - .../jakub-onderka/php-console-color/LICENSE | 27 - .../jakub-onderka/php-console-color/README.md | 10 - .../jakub-onderka/php-console-color/build.xml | 93 - .../php-console-color/composer.json | 23 - .../php-console-color/example.php | 38 - .../php-console-color/phpunit.xml | 16 - .../php-console-color/src/ConsoleColor.php | 287 - .../src/InvalidStyleException.php | 10 - .../tests/ConsoleColorTest.php | 184 - .../php-console-highlighter/.gitignore | 4 - .../php-console-highlighter/.travis.yml | 21 - .../php-console-highlighter/README.md | 40 - .../php-console-highlighter/build.xml | 93 - .../php-console-highlighter/composer.json | 26 - .../examples/snippet.php | 10 - .../examples/whole_file.php | 10 - .../examples/whole_file_line_numbers.php | 10 - .../php-console-highlighter/phpunit.xml | 15 - .../PhpConsoleHighlighter/Highlighter.php | 267 - .../PhpConsoleHighligter/HigligterTest.php | 263 - .../tests/bootstrap.php | 2 - .../justinrainbow/json-schema/.gitattributes | 5 - .../justinrainbow/json-schema/.php_cs.dist | 7 +- .../json-schema/bin/validate-json | 12 +- .../justinrainbow/json-schema/composer.json | 67 +- .../Constraints/CollectionConstraint.php | 56 +- .../src/JsonSchema/Constraints/Constraint.php | 7 +- .../Constraints/NumberConstraint.php | 13 +- .../Constraints/TypeCheck/StrictTypeCheck.php | 4 + .../Constraints/UndefinedConstraint.php | 10 +- .../src/JsonSchema/Uri/UriRetriever.php | 25 +- .../json-schema/src/JsonSchema/Validator.php | 4 +- .../laminas-diactoros}/CHANGELOG.md | 314 +- .../laminas/laminas-diactoros/COPYRIGHT.md | 2 + .../laminas/laminas-diactoros/LICENSE.md | 27 + .../laminas/laminas-diactoros/README.md | 34 + .../laminas/laminas-diactoros/composer.json | 88 + .../src/AbstractSerializer.php | 11 +- .../laminas-diactoros}/src/CallbackStream.php | 11 +- .../Exception/DeprecatedMethodException.php | 18 + .../src/Exception/ExceptionInterface.php | 16 + .../laminas-diactoros}/src/HeaderSecurity.php | 17 +- .../laminas-diactoros}/src/MessageTrait.php | 9 +- .../laminas-diactoros}/src/PhpInputStream.php | 9 +- .../laminas-diactoros}/src/RelativeStream.php | 11 +- .../laminas-diactoros}/src/Request.php | 9 +- .../src/Request/ArraySerializer.php | 13 +- .../src/Request/Serializer.php | 19 +- .../laminas-diactoros}/src/RequestTrait.php | 9 +- .../laminas-diactoros}/src/Response.php | 9 +- .../src/Response/ArraySerializer.php | 13 +- .../src/Response/EmitterInterface.php | 11 +- .../src/Response/EmptyResponse.php | 15 +- .../src/Response/HtmlResponse.php | 15 +- .../src/Response/InjectContentTypeTrait.php | 11 +- .../src/Response/JsonResponse.php | 13 +- .../src/Response/RedirectResponse.php | 13 +- .../src/Response/SapiEmitter.php | 11 +- .../src/Response/SapiEmitterTrait.php | 13 +- .../src/Response/SapiStreamEmitter.php | 11 +- .../src/Response/Serializer.php | 15 +- .../src/Response/TextResponse.php | 15 +- .../src/Response/XmlResponse.php | 13 +- .../laminas-diactoros}/src/Server.php | 11 +- .../laminas-diactoros}/src/ServerRequest.php | 9 +- .../src/ServerRequestFactory.php | 27 +- .../laminas-diactoros}/src/Stream.php | 9 +- .../laminas-diactoros}/src/UploadedFile.php | 9 +- .../laminas-diactoros}/src/Uri.php | 9 +- .../functions/create_uploaded_file.legacy.php | 19 + .../src/functions/create_uploaded_file.php | 9 +- .../marshal_headers_from_sapi.legacy.php | 19 + .../functions/marshal_headers_from_sapi.php | 9 +- .../marshal_method_from_sapi.legacy.php | 19 + .../functions/marshal_method_from_sapi.php | 20 + ...shal_protocol_version_from_sapi.legacy.php | 19 + .../marshal_protocol_version_from_sapi.php | 9 +- .../marshal_uri_from_sapi.legacy.php | 19 + .../src/functions/marshal_uri_from_sapi.php | 13 +- .../src/functions/normalize_server.legacy.php | 19 + .../src/functions/normalize_server.php | 9 +- .../normalize_uploaded_files.legacy.php | 19 + .../functions/normalize_uploaded_files.php | 9 +- .../functions/parse_cookie_header.legacy.php | 19 + .../src/functions/parse_cookie_header.php | 9 +- .../.github/FUNDING.yml | 1 + .../workflows/continuous-integration.yml | 32 + .../workflows/release-on-milestone-closed.yml | 61 + .../.laminas-ci.json | 5 + .../laminas-zendframework-bridge/COPYRIGHT.md | 1 + .../laminas-zendframework-bridge/LICENSE.md | 26 + .../laminas-zendframework-bridge/README.md | 30 + .../composer.json | 61 + .../composer.lock | 3841 +++++++++ .../config/replacements.php | 372 + .../psalm-baseline.xml | 363 + .../psalm.xml.dist | 33 + .../src/Autoloader.php | 166 + .../src/ConfigPostProcessor.php | 426 + .../src/Module.php | 48 + .../src/Replacements.php | 40 + .../src/RewriteRules.php | 73 + .../src/autoload.php | 3 + app/vendor/m1/env/src/Parser.php | 4 +- app/vendor/m1/env/src/Parser/ValueParser.php | 5 +- .../mobiledetectlib/Mobile_Detect.json | 2 +- .../mobiledetectlib/Mobile_Detect.php | 260 +- .../mobiledetect/mobiledetectlib/README.md | 8 +- .../mobiledetectlib/composer.lock | 983 --- .../mobiledetectlib/docker-compose.yml | 16 + .../mobiledetectlib/docs/KNOWN_LIMITATIONS.md | 25 +- .../psysh => nikic/php-parser}/.editorconfig | 16 +- app/vendor/nikic/php-parser/.gitignore | 4 - app/vendor/nikic/php-parser/.travis.yml | 29 - app/vendor/nikic/php-parser/CHANGELOG.md | 591 -- app/vendor/nikic/php-parser/LICENSE | 44 +- app/vendor/nikic/php-parser/README.md | 10 +- app/vendor/nikic/php-parser/UPGRADE-1.0.md | 121 - app/vendor/nikic/php-parser/UPGRADE-2.0.md | 74 - app/vendor/nikic/php-parser/UPGRADE-3.0.md | 160 - app/vendor/nikic/php-parser/UPGRADE-4.0.md | 77 - app/vendor/nikic/php-parser/bin/php-parse | 29 +- app/vendor/nikic/php-parser/composer.json | 27 +- .../php-parser/doc/0_Introduction.markdown | 80 - .../doc/2_Usage_of_basic_components.markdown | 515 -- app/vendor/nikic/php-parser/doc/README.md | 46 - .../doc/component/AST_builders.markdown | 138 - .../Constant_expression_evaluation.markdown | 115 - .../doc/component/Error_handling.markdown | 75 - .../php-parser/doc/component/FAQ.markdown | 68 - .../component/JSON_representation.markdown | 131 - .../php-parser/doc/component/Lexer.markdown | 159 - .../doc/component/Name_resolution.markdown | 87 - .../doc/component/Performance.markdown | 65 - .../doc/component/Pretty_printing.markdown | 96 - .../doc/component/Walking_the_AST.markdown | 335 - app/vendor/nikic/php-parser/grammar/README.md | 10 +- app/vendor/nikic/php-parser/grammar/php5.y | 98 +- app/vendor/nikic/php-parser/grammar/php7.y | 416 +- .../nikic/php-parser/grammar/phpyLang.php | 192 + .../php-parser/grammar/rebuildParsers.php | 218 +- app/vendor/nikic/php-parser/grammar/tokens.y | 24 +- .../lib/PhpParser/Builder/ClassConst.php | 132 + .../lib/PhpParser/Builder/Class_.php | 18 + .../lib/PhpParser/Builder/Function_.php | 17 + .../lib/PhpParser/Builder/Interface_.php | 18 + .../lib/PhpParser/Builder/Method.php | 17 + .../lib/PhpParser/Builder/Namespace_.php | 2 +- .../lib/PhpParser/Builder/Param.php | 24 +- .../lib/PhpParser/Builder/Property.php | 51 +- .../lib/PhpParser/Builder/Trait_.php | 20 +- .../php-parser/lib/PhpParser/Builder/Use_.php | 2 +- .../lib/PhpParser/BuilderFactory.php | 42 +- .../lib/PhpParser/BuilderHelpers.php | 101 +- .../php-parser/lib/PhpParser/Comment.php | 98 +- .../Internal/PrintableNewAnonClassNode.php | 13 +- .../lib/PhpParser/Internal/TokenStream.php | 33 +- .../php-parser/lib/PhpParser/JsonDecoder.php | 4 +- .../nikic/php-parser/lib/PhpParser/Lexer.php | 286 +- .../lib/PhpParser/Lexer/Emulative.php | 242 +- .../Lexer/TokenEmulator/AttributeEmulator.php | 56 + .../CoaleseEqualTokenEmulator.php | 47 + .../Lexer/TokenEmulator/EnumTokenEmulator.php | 31 + .../FlexibleDocStringEmulator.php | 76 + .../Lexer/TokenEmulator/FnTokenEmulator.php | 23 + .../Lexer/TokenEmulator/KeywordEmulator.php | 62 + .../TokenEmulator/MatchTokenEmulator.php | 23 + .../TokenEmulator/NullsafeTokenEmulator.php | 67 + .../NumericLiteralSeparatorEmulator.php | 105 + .../TokenEmulator/ReadonlyTokenEmulator.php | 23 + .../Lexer/TokenEmulator/ReverseEmulator.php | 36 + .../Lexer/TokenEmulator/TokenEmulator.php | 25 + .../nikic/php-parser/lib/PhpParser/Node.php | 2 - .../php-parser/lib/PhpParser/Node/Arg.php | 13 +- .../lib/PhpParser/Node/Attribute.php | 34 + .../lib/PhpParser/Node/AttributeGroup.php | 29 + .../php-parser/lib/PhpParser/Node/Const_.php | 4 +- .../lib/PhpParser/Node/Expr/ArrayDimFetch.php | 2 +- .../lib/PhpParser/Node/Expr/ArrayItem.php | 11 +- .../lib/PhpParser/Node/Expr/Array_.php | 6 +- .../lib/PhpParser/Node/Expr/ArrowFunction.php | 79 + .../lib/PhpParser/Node/Expr/Assign.php | 2 +- .../lib/PhpParser/Node/Expr/AssignOp.php | 2 +- .../PhpParser/Node/Expr/AssignOp/Coalesce.php | 12 + .../lib/PhpParser/Node/Expr/AssignRef.php | 2 +- .../lib/PhpParser/Node/Expr/BinaryOp.php | 2 +- .../lib/PhpParser/Node/Expr/BitwiseNot.php | 2 +- .../lib/PhpParser/Node/Expr/BooleanNot.php | 2 +- .../lib/PhpParser/Node/Expr/Cast.php | 2 +- .../lib/PhpParser/Node/Expr/Cast/Double.php | 5 + .../PhpParser/Node/Expr/ClassConstFetch.php | 2 +- .../lib/PhpParser/Node/Expr/Clone_.php | 2 +- .../lib/PhpParser/Node/Expr/Closure.php | 16 +- .../lib/PhpParser/Node/Expr/ClosureUse.php | 2 +- .../lib/PhpParser/Node/Expr/ConstFetch.php | 2 +- .../lib/PhpParser/Node/Expr/Empty_.php | 2 +- .../lib/PhpParser/Node/Expr/Error.php | 2 +- .../lib/PhpParser/Node/Expr/ErrorSuppress.php | 2 +- .../lib/PhpParser/Node/Expr/Eval_.php | 2 +- .../lib/PhpParser/Node/Expr/Exit_.php | 2 +- .../lib/PhpParser/Node/Expr/FuncCall.php | 2 +- .../lib/PhpParser/Node/Expr/Include_.php | 2 +- .../lib/PhpParser/Node/Expr/Instanceof_.php | 2 +- .../lib/PhpParser/Node/Expr/Isset_.php | 2 +- .../lib/PhpParser/Node/Expr/List_.php | 2 +- .../lib/PhpParser/Node/Expr/Match_.php | 31 + .../lib/PhpParser/Node/Expr/MethodCall.php | 2 +- .../lib/PhpParser/Node/Expr/New_.php | 2 +- .../Node/Expr/NullsafeMethodCall.php | 40 + .../Node/Expr/NullsafePropertyFetch.php | 35 + .../lib/PhpParser/Node/Expr/PostDec.php | 2 +- .../lib/PhpParser/Node/Expr/PostInc.php | 2 +- .../lib/PhpParser/Node/Expr/PreDec.php | 2 +- .../lib/PhpParser/Node/Expr/PreInc.php | 2 +- .../lib/PhpParser/Node/Expr/Print_.php | 2 +- .../lib/PhpParser/Node/Expr/PropertyFetch.php | 2 +- .../lib/PhpParser/Node/Expr/ShellExec.php | 2 +- .../lib/PhpParser/Node/Expr/StaticCall.php | 4 +- .../Node/Expr/StaticPropertyFetch.php | 2 +- .../lib/PhpParser/Node/Expr/Ternary.php | 2 +- .../lib/PhpParser/Node/Expr/Throw_.php | 30 + .../lib/PhpParser/Node/Expr/UnaryMinus.php | 2 +- .../lib/PhpParser/Node/Expr/UnaryPlus.php | 2 +- .../lib/PhpParser/Node/Expr/Variable.php | 4 +- .../lib/PhpParser/Node/Expr/YieldFrom.php | 2 +- .../lib/PhpParser/Node/Expr/Yield_.php | 2 +- .../lib/PhpParser/Node/FunctionLike.php | 13 +- .../lib/PhpParser/Node/Identifier.php | 2 +- .../lib/PhpParser/Node/MatchArm.php | 31 + .../php-parser/lib/PhpParser/Node/Name.php | 10 +- .../lib/PhpParser/Node/NullableType.php | 2 +- .../php-parser/lib/PhpParser/Node/Param.php | 33 +- .../lib/PhpParser/Node/Scalar/DNumber.php | 4 +- .../lib/PhpParser/Node/Scalar/Encapsed.php | 2 +- .../Node/Scalar/EncapsedStringPart.php | 2 +- .../lib/PhpParser/Node/Scalar/LNumber.php | 4 +- .../lib/PhpParser/Node/Scalar/MagicConst.php | 2 +- .../lib/PhpParser/Node/Scalar/String_.php | 27 +- .../lib/PhpParser/Node/Stmt/Break_.php | 2 +- .../lib/PhpParser/Node/Stmt/Case_.php | 4 +- .../lib/PhpParser/Node/Stmt/Catch_.php | 16 +- .../lib/PhpParser/Node/Stmt/ClassConst.php | 32 +- .../lib/PhpParser/Node/Stmt/ClassLike.php | 61 + .../lib/PhpParser/Node/Stmt/ClassMethod.php | 18 +- .../lib/PhpParser/Node/Stmt/Class_.php | 21 +- .../lib/PhpParser/Node/Stmt/Const_.php | 2 +- .../lib/PhpParser/Node/Stmt/Continue_.php | 2 +- .../PhpParser/Node/Stmt/DeclareDeclare.php | 2 +- .../lib/PhpParser/Node/Stmt/Declare_.php | 2 +- .../lib/PhpParser/Node/Stmt/Do_.php | 2 +- .../lib/PhpParser/Node/Stmt/Echo_.php | 2 +- .../lib/PhpParser/Node/Stmt/ElseIf_.php | 2 +- .../lib/PhpParser/Node/Stmt/Else_.php | 2 +- .../lib/PhpParser/Node/Stmt/EnumCase.php | 37 + .../lib/PhpParser/Node/Stmt/Enum_.php | 40 + .../lib/PhpParser/Node/Stmt/Expression.php | 2 +- .../lib/PhpParser/Node/Stmt/Finally_.php | 2 +- .../lib/PhpParser/Node/Stmt/For_.php | 2 +- .../lib/PhpParser/Node/Stmt/Foreach_.php | 2 +- .../lib/PhpParser/Node/Stmt/Function_.php | 16 +- .../lib/PhpParser/Node/Stmt/Global_.php | 2 +- .../lib/PhpParser/Node/Stmt/Goto_.php | 2 +- .../lib/PhpParser/Node/Stmt/GroupUse.php | 2 +- .../lib/PhpParser/Node/Stmt/HaltCompiler.php | 2 +- .../lib/PhpParser/Node/Stmt/If_.php | 2 +- .../lib/PhpParser/Node/Stmt/InlineHTML.php | 2 +- .../lib/PhpParser/Node/Stmt/Interface_.php | 12 +- .../lib/PhpParser/Node/Stmt/Label.php | 2 +- .../lib/PhpParser/Node/Stmt/Namespace_.php | 2 +- .../lib/PhpParser/Node/Stmt/Property.php | 35 +- .../PhpParser/Node/Stmt/PropertyProperty.php | 2 +- .../lib/PhpParser/Node/Stmt/Return_.php | 2 +- .../lib/PhpParser/Node/Stmt/StaticVar.php | 2 +- .../lib/PhpParser/Node/Stmt/Static_.php | 2 +- .../lib/PhpParser/Node/Stmt/Switch_.php | 2 +- .../lib/PhpParser/Node/Stmt/Throw_.php | 4 +- .../lib/PhpParser/Node/Stmt/TraitUse.php | 2 +- .../Node/Stmt/TraitUseAdaptation/Alias.php | 2 +- .../Stmt/TraitUseAdaptation/Precedence.php | 2 +- .../lib/PhpParser/Node/Stmt/Trait_.php | 10 +- .../lib/PhpParser/Node/Stmt/TryCatch.php | 6 +- .../lib/PhpParser/Node/Stmt/Unset_.php | 2 +- .../lib/PhpParser/Node/Stmt/UseUse.php | 2 +- .../lib/PhpParser/Node/Stmt/Use_.php | 2 +- .../lib/PhpParser/Node/Stmt/While_.php | 2 +- .../lib/PhpParser/Node/UnionType.php | 30 + .../php-parser/lib/PhpParser/NodeAbstract.php | 41 +- .../php-parser/lib/PhpParser/NodeDumper.php | 3 + .../lib/PhpParser/NodeTraverser.php | 39 +- .../PhpParser/NodeVisitor/NameResolver.php | 47 +- .../NodeVisitor/NodeConnectingVisitor.php | 52 + .../NodeVisitor/ParentConnectingVisitor.php | 41 + .../php-parser/lib/PhpParser/Parser/Php5.php | 2371 +++--- .../php-parser/lib/PhpParser/Parser/Php7.php | 2462 +++--- .../lib/PhpParser/Parser/Tokens.php | 254 +- .../lib/PhpParser/ParserAbstract.php | 244 +- .../lib/PhpParser/PrettyPrinter/Standard.php | 196 +- .../lib/PhpParser/PrettyPrinterAbstract.php | 291 +- app/vendor/nikic/php-parser/phpunit.xml.dist | 18 - .../test/PhpParser/Builder/ClassTest.php | 162 - .../test/PhpParser/Builder/FunctionTest.php | 121 - .../test/PhpParser/Builder/InterfaceTest.php | 105 - .../test/PhpParser/Builder/MethodTest.php | 169 - .../test/PhpParser/Builder/NamespaceTest.php | 47 - .../test/PhpParser/Builder/ParamTest.php | 171 - .../test/PhpParser/Builder/PropertyTest.php | 148 - .../test/PhpParser/Builder/TraitTest.php | 49 - .../Builder/TraitUseAdaptationTest.php | 121 - .../test/PhpParser/Builder/TraitUseTest.php | 57 - .../test/PhpParser/Builder/UseTest.php | 35 - .../test/PhpParser/BuilderFactoryTest.php | 342 - .../test/PhpParser/CodeParsingTest.php | 121 - .../test/PhpParser/CodeTestAbstract.php | 30 - .../test/PhpParser/CodeTestParser.php | 68 - .../php-parser/test/PhpParser/CommentTest.php | 76 - .../test/PhpParser/ConstExprEvaluatorTest.php | 133 - .../PhpParser/ErrorHandler/CollectingTest.php | 24 - .../PhpParser/ErrorHandler/ThrowingTest.php | 18 - .../php-parser/test/PhpParser/ErrorTest.php | 108 - .../test/PhpParser/Internal/DifferTest.php | 67 - .../test/PhpParser/JsonDecoderTest.php | 45 - .../test/PhpParser/Lexer/EmulativeTest.php | 133 - .../php-parser/test/PhpParser/LexerTest.php | 266 - .../test/PhpParser/NameContextTest.php | 66 - .../test/PhpParser/Node/IdentifierTest.php | 31 - .../test/PhpParser/Node/NameTest.php | 173 - .../PhpParser/Node/Scalar/MagicConstTest.php | 28 - .../test/PhpParser/Node/Scalar/StringTest.php | 63 - .../PhpParser/Node/Stmt/ClassConstTest.php | 36 - .../PhpParser/Node/Stmt/ClassMethodTest.php | 124 - .../test/PhpParser/Node/Stmt/ClassTest.php | 61 - .../PhpParser/Node/Stmt/InterfaceTest.php | 27 - .../test/PhpParser/Node/Stmt/PropertyTest.php | 46 - .../test/PhpParser/NodeAbstractTest.php | 327 - .../test/PhpParser/NodeDumperTest.php | 109 - .../test/PhpParser/NodeFinderTest.php | 60 - .../test/PhpParser/NodeTraverserTest.php | 312 - .../NodeVisitor/FindingVisitorTest.php | 54 - .../NodeVisitor/FirstFindingVisitorTest.php | 39 - .../NodeVisitor/NameResolverTest.php | 493 -- .../test/PhpParser/Parser/MultipleTest.php | 96 - .../test/PhpParser/Parser/Php5Test.php | 15 - .../test/PhpParser/Parser/Php7Test.php | 15 - .../test/PhpParser/ParserFactoryTest.php | 37 - .../php-parser/test/PhpParser/ParserTest.php | 185 - .../test/PhpParser/PrettyPrinterTest.php | 315 - .../nikic/php-parser/test/bootstrap.php | 31 - .../code/formatPreservation/anonClasses.test | 16 - .../test/code/formatPreservation/basic.test | 190 - .../formatPreservation/blockConversion.test | 29 - .../code/formatPreservation/comments.test | 52 - .../test/code/formatPreservation/fixup.test | 67 - .../code/formatPreservation/inlineHtml.test | 54 - .../insertionOfNullable.test | 176 - .../formatPreservation/listInsertion.test | 312 - .../listInsertionIndentation.test | 17 - .../code/formatPreservation/listRemoval.test | 41 - .../formatPreservation/modifierChange.test | 33 - .../formatPreservation/nopCommentAtEnd.test | 11 - .../formatPreservation/removalViaNull.test | 194 - .../code/formatPreservation/traitAlias.test | 19 - .../test/code/parser/blockComments.test | 36 - .../test/code/parser/commentAtEndOfClass.test | 37 - .../php-parser/test/code/parser/comments.test | 108 - .../code/parser/errorHandling/eofError.test | 36 - .../parser/errorHandling/lexerErrors.test | 140 - .../code/parser/errorHandling/recovery.test | 1376 ---- .../test/code/parser/expr/arrayDef.test | 161 - .../code/parser/expr/arrayDestructuring.test | 152 - .../test/code/parser/expr/assign.test | 363 - .../test/code/parser/expr/assignNewByRef.test | 43 - .../test/code/parser/expr/cast.test | 94 - .../test/code/parser/expr/clone.test | 15 - .../test/code/parser/expr/closure.test | 176 - .../test/code/parser/expr/comparison.test | 129 - .../test/code/parser/expr/constant_expr.test | 691 -- .../test/code/parser/expr/errorSuppress.test | 14 - .../test/code/parser/expr/exit.test | 46 - .../code/parser/expr/fetchAndCall/args.test | 109 - .../parser/expr/fetchAndCall/constFetch.test | 43 - .../expr/fetchAndCall/constantDeref.test | 253 - .../parser/expr/fetchAndCall/funcCall.test | 158 - .../parser/expr/fetchAndCall/newDeref.test | 82 - .../expr/fetchAndCall/objectAccess.test | 184 - .../expr/fetchAndCall/simpleArrayAccess.test | 72 - .../parser/expr/fetchAndCall/staticCall.test | 214 - .../fetchAndCall/staticPropertyFetch.test | 113 - .../test/code/parser/expr/includeAndEval.test | 50 - .../test/code/parser/expr/issetAndEmpty.test | 85 - .../test/code/parser/expr/listReferences.test | 88 - .../test/code/parser/expr/listWithKeys.test | 79 - .../test/code/parser/expr/logic.test | 190 - .../test/code/parser/expr/math.test | 313 - .../php-parser/test/code/parser/expr/new.test | 187 - .../code/parser/expr/newWithoutClass.test | 25 - .../test/code/parser/expr/print.test | 14 - .../test/code/parser/expr/shellExec.test | 56 - .../code/parser/expr/ternaryAndCoalesce.test | 174 - .../test/code/parser/expr/trailingCommas.test | 140 - .../expr/uvs/globalNonSimpleVarError.test | 27 - .../code/parser/expr/uvs/indirectCall.test | 507 -- .../test/code/parser/expr/uvs/isset.test | 84 - .../test/code/parser/expr/uvs/misc.test | 127 - .../test/code/parser/expr/uvs/new.test | 119 - .../code/parser/expr/uvs/staticProperty.test | 123 - .../test/code/parser/expr/variable.test | 67 - .../test/code/parser/exprStmtMode.test | 57 - .../code/parser/scalar/constantString.test | 86 - .../test/code/parser/scalar/docString.test | 115 - .../code/parser/scalar/docStringNewlines.test | 77 - .../parser/scalar/encapsedNegVarOffset.test | 82 - .../code/parser/scalar/encapsedString.test | 344 - .../test/code/parser/scalar/float.test | 108 - .../test/code/parser/scalar/int.test | 61 - .../test/code/parser/scalar/invalidOctal.test | 26 - .../test/code/parser/scalar/magicConst.test | 47 - .../code/parser/scalar/unicodeEscape.test | 26 - .../test/code/parser/semiReserved.test | 488 -- .../code/parser/stmt/blocklessStatement.test | 130 - .../test/code/parser/stmt/class/abstract.test | 45 - .../code/parser/stmt/class/anonymous.test | 213 - .../code/parser/stmt/class/conditional.test | 35 - .../stmt/class/constModifierErrors.test | 137 - .../parser/stmt/class/constModifiers.test | 77 - .../test/code/parser/stmt/class/final.test | 19 - .../parser/stmt/class/implicitPublic.test | 108 - .../code/parser/stmt/class/interface.test | 40 - .../test/code/parser/stmt/class/modifier.test | 249 - .../test/code/parser/stmt/class/name.test | 266 - .../code/parser/stmt/class/php4Style.test | 58 - .../test/code/parser/stmt/class/simple.test | 182 - .../code/parser/stmt/class/staticMethod.test | 175 - .../test/code/parser/stmt/class/trait.test | 188 - .../test/code/parser/stmt/const.test | 48 - .../test/code/parser/stmt/controlFlow.test | 59 - .../test/code/parser/stmt/declare.test | 70 - .../test/code/parser/stmt/echo.test | 32 - .../function/builtinTypeDeclarations.test | 87 - .../test/code/parser/stmt/function/byRef.test | 49 - .../parser/stmt/function/conditional.test | 35 - .../parser/stmt/function/defaultValues.test | 170 - .../parser/stmt/function/nullableTypes.test | 55 - .../parser/stmt/function/returnTypes.test | 64 - .../parser/stmt/function/specialVars.test | 57 - .../stmt/function/typeDeclarations.test | 63 - .../code/parser/stmt/function/variadic.test | 134 - .../stmt/function/variadicDefaultValue.test | 31 - .../code/parser/stmt/generator/basic.test | 319 - .../stmt/generator/yieldPrecedence.test | 250 - .../stmt/generator/yieldUnaryPrecedence.test | 56 - .../test/code/parser/stmt/haltCompiler.test | 61 - .../stmt/haltCompilerInvalidSyntax.test | 6 - .../code/parser/stmt/haltCompilerOffset.test | 36 - .../stmt/haltCompilerOutermostScope.test | 8 - .../test/code/parser/stmt/hashbang.test | 26 - .../php-parser/test/code/parser/stmt/if.test | 103 - .../test/code/parser/stmt/inlineHTML.test | 33 - .../test/code/parser/stmt/loop/do.test | 17 - .../test/code/parser/stmt/loop/for.test | 110 - .../test/code/parser/stmt/loop/foreach.test | 164 - .../test/code/parser/stmt/loop/while.test | 25 - .../test/code/parser/stmt/multiCatch.test | 75 - .../code/parser/stmt/namespace/alias.test | 178 - .../code/parser/stmt/namespace/braced.test | 46 - .../stmt/namespace/commentAfterNamespace.test | 22 - .../code/parser/stmt/namespace/groupUse.test | 188 - .../parser/stmt/namespace/groupUseErrors.test | 113 - .../stmt/namespace/groupUsePositions.test | 28 - .../stmt/namespace/groupUseTrailingComma.test | 47 - .../parser/stmt/namespace/invalidName.test | 87 - .../test/code/parser/stmt/namespace/mix.test | 103 - .../test/code/parser/stmt/namespace/name.test | 50 - .../code/parser/stmt/namespace/nested.test | 30 - .../code/parser/stmt/namespace/notBraced.test | 49 - .../stmt/namespace/nsAfterHashbang.test | 22 - .../parser/stmt/namespace/outsideStmt.test | 60 - .../stmt/namespace/outsideStmtInvalid.test | 109 - .../test/code/parser/stmt/switch.test | 81 - .../test/code/parser/stmt/tryCatch.test | 144 - .../code/parser/stmt/tryWithoutCatch.test | 29 - .../test/code/parser/stmt/unset.test | 26 - .../test/code/prettyPrinter/comments.test | 67 - .../prettyPrinter/commentsInCommaList.test | 53 - .../prettyPrinter/expr/anonymousClass.test | 27 - .../expr/arrayDestructuring.test | 14 - .../test/code/prettyPrinter/expr/call.test | 13 - .../test/code/prettyPrinter/expr/closure.test | 18 - .../prettyPrinter/expr/constant_deref.test | 13 - .../code/prettyPrinter/expr/docStrings.test | 86 - .../test/code/prettyPrinter/expr/include.test | 7 - .../code/prettyPrinter/expr/intrinsics.test | 29 - .../test/code/prettyPrinter/expr/list.test | 19 - .../code/prettyPrinter/expr/literals.test | 158 - .../test/code/prettyPrinter/expr/numbers.test | 35 - .../code/prettyPrinter/expr/operators.test | 144 - .../code/prettyPrinter/expr/parentheses.test | 86 - .../prettyPrinter/expr/shortArraySyntax.test | 11 - .../prettyPrinter/expr/stringEscaping.test | 23 - .../test/code/prettyPrinter/expr/uvs.test | 23 - .../code/prettyPrinter/expr/variables.test | 73 - .../test/code/prettyPrinter/expr/yield.test | 46 - .../inlineHTMLandPHPtest.file-test | 58 - .../code/prettyPrinter/nestedInlineHTML.test | 16 - .../prettyPrinter/onlyInlineHTML.file-test | 19 - .../test/code/prettyPrinter/onlyPHP.file-test | 16 - .../test/code/prettyPrinter/stmt/alias.test | 20 - .../prettyPrinter/stmt/break_continue.test | 13 - .../test/code/prettyPrinter/stmt/class.test | 53 - .../code/prettyPrinter/stmt/class_const.test | 20 - .../test/code/prettyPrinter/stmt/const.test | 11 - .../test/code/prettyPrinter/stmt/declare.test | 17 - .../code/prettyPrinter/stmt/do_while.test | 10 - .../test/code/prettyPrinter/stmt/for.test | 28 - .../test/code/prettyPrinter/stmt/foreach.test | 28 - .../stmt/function_signatures.test | 43 - .../stmt/global_static_variables.test | 11 - .../test/code/prettyPrinter/stmt/goto.test | 9 - .../code/prettyPrinter/stmt/groupUse.test | 16 - .../prettyPrinter/stmt/haltCompiler.file-test | 27 - .../test/code/prettyPrinter/stmt/if.test | 16 - .../code/prettyPrinter/stmt/multiCatch.test | 19 - .../code/prettyPrinter/stmt/namespaces.test | 50 - .../prettyPrinter/stmt/nullable_types.test | 11 - .../test/code/prettyPrinter/stmt/switch.test | 37 - .../test/code/prettyPrinter/stmt/throw.test | 7 - .../code/prettyPrinter/stmt/traitUse.test | 25 - .../code/prettyPrinter/stmt/tryCatch.test | 24 - .../test/code/prettyPrinter/stmt/while.test | 10 - .../nikic/php-parser/test/updateTests.php | 32 - .../nikic/php-parser/test_old/run-php-src.sh | 4 - app/vendor/nikic/php-parser/test_old/run.php | 251 - .../random_compat}/LICENSE | 5 +- .../paragonie/random_compat/build-phar.sh | 5 + .../paragonie/random_compat/composer.json | 34 + .../dist/random_compat.phar.pubkey | 5 + .../dist/random_compat.phar.pubkey.asc | 11 + .../paragonie/random_compat/lib/random.php | 32 + .../random_compat/other/build_phar.php | 57 + .../random_compat/psalm-autoload.php | 9 + app/vendor/paragonie/random_compat/psalm.xml | 19 + app/vendor/psr/log/.gitignore | 1 - app/vendor/psr/log/Psr/Log/AbstractLogger.php | 32 +- .../psr/log/Psr/Log/LoggerAwareTrait.php | 2 +- .../psr/log/Psr/Log/LoggerInterface.php | 40 +- app/vendor/psr/log/Psr/Log/LoggerTrait.php | 2 + app/vendor/psr/log/Psr/Log/NullLogger.php | 2 + app/vendor/psr/log/Psr/Log/Test/DummyTest.php | 18 + .../log/Psr/Log/Test/LoggerInterfaceTest.php | 10 +- .../psr/log/Psr/Log/Test/TestLogger.php | 1 + app/vendor/psr/log/README.md | 6 + app/vendor/psr/log/composer.json | 4 +- app/vendor/psy/psysh/.github/CONTRIBUTING.md | 9 - app/vendor/psy/psysh/.gitignore | 9 - app/vendor/psy/psysh/.phan/config.php | 7 - app/vendor/psy/psysh/.php_cs | 32 - app/vendor/psy/psysh/.styleci.yml | 29 - app/vendor/psy/psysh/.travis.yml | 44 - app/vendor/psy/psysh/Makefile | 95 - app/vendor/psy/psysh/README.md | 3 +- app/vendor/psy/psysh/bin/build-stub | 22 - app/vendor/psy/psysh/bin/psysh | 38 +- app/vendor/psy/psysh/box.json.dist | 13 - app/vendor/psy/psysh/composer.json | 15 +- app/vendor/psy/psysh/phpunit.xml.dist | 12 - app/vendor/psy/psysh/src/CodeCleaner.php | 102 +- .../src/CodeCleaner/AbstractClassPass.php | 10 +- .../CodeCleaner/AssignThisVariablePass.php | 6 +- .../CallTimePassByReferencePass.php | 6 +- .../psysh/src/CodeCleaner/CalledClassPass.php | 4 +- .../psysh/src/CodeCleaner/CodeCleanerPass.php | 2 +- .../CodeCleaner/EmptyArrayDimFetchPass.php | 50 + .../psy/psysh/src/CodeCleaner/ExitPass.php | 5 +- .../psysh/src/CodeCleaner/FinalClassPass.php | 6 +- .../src/CodeCleaner/FunctionContextPass.php | 4 +- .../FunctionReturnInWriteContextPass.php | 23 +- .../src/CodeCleaner/ImplicitReturnPass.php | 2 +- .../psysh/src/CodeCleaner/InstanceOfPass.php | 26 +- .../psy/psysh/src/CodeCleaner/IssetPass.php | 47 + .../src/CodeCleaner/LabelContextPass.php | 91 + .../src/CodeCleaner/LeavePsyshAlonePass.php | 2 +- .../psysh/src/CodeCleaner/LegacyEmptyPass.php | 73 - .../psy/psysh/src/CodeCleaner/ListPass.php | 18 +- .../psysh/src/CodeCleaner/LoopContextPass.php | 10 +- .../src/CodeCleaner/MagicConstantsPass.php | 4 +- .../src/CodeCleaner/NamespaceAwarePass.php | 4 +- .../psysh/src/CodeCleaner/NamespacePass.php | 4 +- .../psysh/src/CodeCleaner/NoReturnValue.php | 6 +- .../CodeCleaner/PassableByReferencePass.php | 12 +- .../psy/psysh/src/CodeCleaner/RequirePass.php | 46 +- .../psysh/src/CodeCleaner/ReturnTypePass.php | 118 + .../psysh/src/CodeCleaner/StrictTypesPass.php | 8 +- .../src/CodeCleaner/UseStatementPass.php | 56 +- .../src/CodeCleaner/ValidClassNamePass.php | 65 +- .../src/CodeCleaner/ValidConstantPass.php | 8 +- .../src/CodeCleaner/ValidConstructorPass.php | 6 +- .../src/CodeCleaner/ValidFunctionNamePass.php | 10 +- .../psy/psysh/src/Command/BufferCommand.php | 4 +- .../psy/psysh/src/Command/ClearCommand.php | 4 +- app/vendor/psy/psysh/src/Command/Command.php | 39 +- .../psy/psysh/src/Command/DocCommand.php | 138 +- .../psy/psysh/src/Command/DumpCommand.php | 8 +- .../psy/psysh/src/Command/EditCommand.php | 9 +- .../psy/psysh/src/Command/ExitCommand.php | 2 +- .../psy/psysh/src/Command/HelpCommand.php | 15 +- .../psy/psysh/src/Command/HistoryCommand.php | 42 +- .../psy/psysh/src/Command/ListCommand.php | 66 +- .../ListCommand/ClassConstantEnumerator.php | 15 +- .../Command/ListCommand/ClassEnumerator.php | 44 +- .../ListCommand/ConstantEnumerator.php | 85 +- .../src/Command/ListCommand/Enumerator.php | 26 +- .../ListCommand/FunctionEnumerator.php | 54 +- .../ListCommand/GlobalVariableEnumerator.php | 10 +- .../ListCommand/InterfaceEnumerator.php | 89 - .../Command/ListCommand/MethodEnumerator.php | 21 +- .../ListCommand/PropertyEnumerator.php | 26 +- .../Command/ListCommand/TraitEnumerator.php | 89 - .../ListCommand/VariableEnumerator.php | 12 +- .../psy/psysh/src/Command/ParseCommand.php | 28 +- .../psysh/src/Command/PsyVersionCommand.php | 4 +- .../psysh/src/Command/ReflectingCommand.php | 67 +- .../psy/psysh/src/Command/ShowCommand.php | 66 +- .../psy/psysh/src/Command/SudoCommand.php | 10 +- .../psy/psysh/src/Command/ThrowUpCommand.php | 34 +- .../psy/psysh/src/Command/TimeitCommand.php | 10 +- .../Command/TimeitCommand/TimeitVisitor.php | 19 +- .../psy/psysh/src/Command/TraceCommand.php | 84 +- .../psy/psysh/src/Command/WhereamiCommand.php | 65 +- .../psy/psysh/src/Command/WtfCommand.php | 25 +- app/vendor/psy/psysh/src/ConfigPaths.php | 304 +- app/vendor/psy/psysh/src/Configuration.php | 659 +- .../psy/psysh/src/ConsoleColorFactory.php | 51 +- app/vendor/psy/psysh/src/Context.php | 10 +- app/vendor/psy/psysh/src/ContextAware.php | 2 +- app/vendor/psy/psysh/src/EnvInterface.php | 25 + .../psysh/src/Exception/BreakException.php | 2 +- .../src/Exception/DeprecatedException.php | 2 +- .../psysh/src/Exception/ErrorException.php | 38 +- .../psy/psysh/src/Exception/Exception.php | 2 +- .../src/Exception/FatalErrorException.php | 14 +- .../src/Exception/ParseErrorException.php | 2 +- .../psysh/src/Exception/RuntimeException.php | 8 +- .../psysh/src/Exception/ThrowUpException.php | 2 +- .../src/Exception/TypeErrorException.php | 2 +- .../Exception/UnexpectedTargetException.php | 37 + app/vendor/psy/psysh/src/ExecutionClosure.php | 45 +- app/vendor/psy/psysh/src/ExecutionLoop.php | 67 - .../src/ExecutionLoop/AbstractListener.php | 2 +- .../psy/psysh/src/ExecutionLoop/Listener.php | 2 +- .../psysh/src/ExecutionLoop/ProcessForker.php | 85 +- .../src/ExecutionLoop/RunkitReloader.php | 17 +- .../psy/psysh/src/ExecutionLoopClosure.php | 14 +- .../psy/psysh/src/Formatter/CodeFormatter.php | 297 +- .../psysh/src/Formatter/DocblockFormatter.php | 16 +- .../psy/psysh/src/Formatter/Formatter.php | 12 +- .../src/Formatter/ReflectorFormatter.php | 25 + .../src/Formatter/SignatureFormatter.php | 91 +- .../psysh/src/Formatter/TraceFormatter.php | 104 + .../psy/psysh/src/Input/CodeArgument.php | 2 +- .../psy/psysh/src/Input/FilterOptions.php | 32 +- app/vendor/psy/psysh/src/Input/ShellInput.php | 18 +- .../psy/psysh/src/Input/SilentInput.php | 2 +- .../psy/psysh/src/Output/OutputPager.php | 2 +- .../psy/psysh/src/Output/PassthruPager.php | 2 +- .../psy/psysh/src/Output/ProcOutputPager.php | 9 +- .../psy/psysh/src/Output/ShellOutput.php | 56 +- app/vendor/psy/psysh/src/ParserFactory.php | 12 +- .../psy/psysh/src/Readline/GNUReadline.php | 30 +- .../psy/psysh/src/Readline/HoaConsole.php | 20 +- app/vendor/psy/psysh/src/Readline/Libedit.php | 35 +- .../psy/psysh/src/Readline/Readline.php | 4 +- .../psy/psysh/src/Readline/Transient.php | 8 +- .../Reflection/ReflectionClassConstant.php | 14 +- .../src/Reflection/ReflectionConstant.php | 4 +- .../src/Reflection/ReflectionConstant_.php | 8 +- .../ReflectionLanguageConstruct.php | 6 +- .../ReflectionLanguageConstructParameter.php | 6 +- .../src/Reflection/ReflectionNamespace.php | 60 + app/vendor/psy/psysh/src/Shell.php | 386 +- app/vendor/psy/psysh/src/Sudo.php | 64 +- app/vendor/psy/psysh/src/Sudo/SudoVisitor.php | 43 +- app/vendor/psy/psysh/src/SuperglobalsEnv.php | 32 + .../psysh/src/TabCompletion/AutoCompleter.php | 4 +- .../Matcher/AbstractContextAwareMatcher.php | 2 +- .../AbstractDefaultParametersMatcher.php | 8 +- .../TabCompletion/Matcher/AbstractMatcher.php | 9 +- .../Matcher/ClassAttributesMatcher.php | 8 +- .../ClassMethodDefaultParametersMatcher.php | 6 +- .../Matcher/ClassMethodsMatcher.php | 6 +- .../Matcher/ClassNamesMatcher.php | 6 +- .../TabCompletion/Matcher/CommandsMatcher.php | 2 +- .../Matcher/ConstantsMatcher.php | 4 +- .../FunctionDefaultParametersMatcher.php | 2 +- .../Matcher/FunctionsMatcher.php | 6 +- .../TabCompletion/Matcher/KeywordsMatcher.php | 4 +- .../Matcher/MongoClientMatcher.php | 8 +- .../Matcher/MongoDatabaseMatcher.php | 8 +- .../Matcher/ObjectAttributesMatcher.php | 4 +- .../ObjectMethodDefaultParametersMatcher.php | 6 +- .../Matcher/ObjectMethodsMatcher.php | 4 +- .../Matcher/VariablesMatcher.php | 2 +- app/vendor/psy/psysh/src/Util/Docblock.php | 15 +- app/vendor/psy/psysh/src/Util/Json.php | 4 +- app/vendor/psy/psysh/src/Util/Mirror.php | 81 +- app/vendor/psy/psysh/src/Util/Str.php | 2 +- app/vendor/psy/psysh/src/VarDumper/Cloner.php | 2 +- app/vendor/psy/psysh/src/VarDumper/Dumper.php | 8 +- .../psy/psysh/src/VarDumper/Presenter.php | 18 +- .../psysh/src/VarDumper/PresenterAware.php | 2 +- .../psy/psysh/src/VersionUpdater/Checker.php | 10 +- .../src/VersionUpdater/GitHubChecker.php | 10 +- .../src/VersionUpdater/IntervalChecker.php | 6 +- .../psysh/src/VersionUpdater/NoopChecker.php | 2 +- app/vendor/psy/psysh/src/functions.php | 233 +- .../psy/psysh/test/ClassWithSecrets.php | 37 - .../CodeCleaner/AbstractClassPassTest.php | 57 - .../AssignThisVariablePassTest.php | 58 - .../CallTimePassByReferencePassTest.php | 59 - .../test/CodeCleaner/CalledClassPassTest.php | 90 - .../test/CodeCleaner/CodeCleanerTestCase.php | 41 - .../psysh/test/CodeCleaner/ExitPassTest.php | 59 - .../test/CodeCleaner/FinalClassPassTest.php | 65 - .../Fixtures/ClassWithCallStatic.php | 20 - .../CodeCleaner/Fixtures/ClassWithStatic.php | 20 - .../CodeCleaner/Fixtures/TraitWithStatic.php | 20 - .../CodeCleaner/FunctionContextPassTest.php | 56 - .../FunctionReturnInWriteContextPassTest.php | 91 - .../CodeCleaner/ImplicitReturnPassTest.php | 112 - .../test/CodeCleaner/InstanceOfPassTest.php | 72 - .../CodeCleaner/LeavePsyshAlonePassTest.php | 69 - .../test/CodeCleaner/LegacyEmptyPassTest.php | 76 - .../psysh/test/CodeCleaner/ListPassTest.php | 109 - .../test/CodeCleaner/LoopContextPassTest.php | 108 - .../CodeCleaner/MagicConstantsPassTest.php | 39 - .../test/CodeCleaner/NamespacePassTest.php | 59 - .../test/CodeCleaner/NoReturnValueTest.php | 32 - .../PassableByReferencePassTest.php | 104 - .../test/CodeCleaner/RequirePassTest.php | 93 - .../test/CodeCleaner/StrictTypesPassTest.php | 52 - .../test/CodeCleaner/UseStatementPassTest.php | 102 - .../CodeCleaner/ValidClassNamePassTest.php | 325 - .../CodeCleaner/ValidConstantPassTest.php | 65 - .../CodeCleaner/ValidConstructorPassTest.php | 93 - .../CodeCleaner/ValidFunctionNamePassTest.php | 180 - app/vendor/psy/psysh/test/CodeCleanerTest.php | 131 - .../psysh/test/Command/ExitCommandTest.php | 29 - .../psysh/test/Command/ThrowUpCommandTest.php | 89 - .../TimeitCommand/TimeitVisitorTest.php | 52 - .../psy/psysh/test/ConfigurationTest.php | 256 - .../psysh/test/ConsoleColorFactoryTest.php | 51 - app/vendor/psy/psysh/test/ContextTest.php | 325 - .../test/Exception/BreakExceptionTest.php | 42 - .../test/Exception/ErrorExceptionTest.php | 125 - .../Exception/FatalErrorExceptionTest.php | 51 - .../Exception/ParseErrorExceptionTest.php | 42 - .../test/Exception/RuntimeExceptionTest.php | 30 - .../test/Exception/ThrowUpExceptionTest.php | 66 - .../test/Exception/TypeErrorExceptionTest.php | 52 - app/vendor/psy/psysh/test/FakeShell.php | 29 - .../test/Formatter/CodeFormatterTest.php | 129 - .../test/Formatter/DocblockFormatterTest.php | 63 - .../test/Formatter/Fixtures/BoringTrait.php | 20 - .../test/Formatter/Fixtures/SomeClass.php | 30 - .../test/Formatter/SignatureFormatterTest.php | 95 - .../psy/psysh/test/Input/CodeArgumentTest.php | 52 - .../psysh/test/Input/FilterOptionsTest.php | 105 - .../psy/psysh/test/Input/ShellInputTest.php | 254 - app/vendor/psy/psysh/test/ParserTestCase.php | 97 - .../psysh/test/Readline/GNUReadlineTest.php | 80 - .../psysh/test/Readline/HoaConsoleTest.php | 31 - .../psy/psysh/test/Readline/LibeditTest.php | 128 - .../psy/psysh/test/Readline/TransientTest.php | 76 - .../ReflectionClassConstantTest.php | 81 - .../Reflection/ReflectionConstantBCTest.php | 26 - .../Reflection/ReflectionConstantTest.php | 114 - ...flectionLanguageConstructParameterTest.php | 64 - .../ReflectionLanguageConstructTest.php | 102 - app/vendor/psy/psysh/test/ShellTest.php | 442 -- .../psy/psysh/test/Sudo/SudoVisitorTest.php | 142 - app/vendor/psy/psysh/test/SudoTest.php | 80 - .../test/TabCompletion/AutoCompleterTest.php | 145 - .../psysh/test/TabCompletion/StaticSample.php | 27 - .../psy/psysh/test/Util/DocblockTest.php | 100 - app/vendor/psy/psysh/test/Util/MirrorTest.php | 86 - app/vendor/psy/psysh/test/Util/StrTest.php | 31 - .../test/VersionUpdater/GitHubCheckerTest.php | 82 - .../test/VersionUpdater/NoopCheckerTest.php | 25 - app/vendor/psy/psysh/test/fixtures/config.php | 20 - app/vendor/psy/psysh/test/fixtures/empty.php | 12 - .../test/fixtures/mixed/.psysh/psysh_history | 0 .../psysh/test/fixtures/mixed/.psysh/rc.php | 1 - .../psysh/test/fixtures/project/.psysh.php | 17 - .../psysh/test/fixtures/unvis_fixtures.json | 1 - .../psysh/test/tools/gen_unvis_fixtures.py | 94 - app/vendor/psy/psysh/test/tools/vis.py | 126 - .../psy/psysh/vendor-bin/box/composer.json | 7 - .../psy/psysh/vendor-bin/box/composer.lock | 2524 ------ app/vendor/react/promise/CHANGELOG.md | 162 + app/vendor/react/promise/LICENSE | 22 + app/vendor/react/promise/README.md | 876 +++ app/vendor/react/promise/composer.json | 29 + .../src/CancellablePromiseInterface.php | 17 + .../react/promise/src/CancellationQueue.php | 55 + app/vendor/react/promise/src/Deferred.php | 65 + .../promise/src/Exception/LengthException.php | 7 + .../promise/src/ExtendedPromiseInterface.php | 98 + .../react/promise/src/FulfilledPromise.php | 71 + app/vendor/react/promise/src/LazyPromise.php | 66 + app/vendor/react/promise/src/Promise.php | 256 + .../react/promise/src/PromiseInterface.php | 41 + .../react/promise/src/PromisorInterface.php | 13 + .../react/promise/src/RejectedPromise.php | 79 + .../src/UnhandledRejectionException.php | 31 + app/vendor/react/promise/src/functions.php | 351 + .../react/promise/src/functions_include.php | 5 + app/vendor/seld/jsonlint/.travis.yml | 25 - app/vendor/seld/jsonlint/CHANGELOG.md | 14 + app/vendor/seld/jsonlint/README.md | 11 +- app/vendor/seld/jsonlint/bin/jsonlint | 8 +- app/vendor/seld/jsonlint/composer.json | 2 +- app/vendor/seld/jsonlint/phpunit.xml.dist | 25 - .../Seld/JsonLint/DuplicateKeyException.php | 13 + .../jsonlint/src/Seld/JsonLint/JsonParser.php | 59 +- .../seld/jsonlint/src/Seld/JsonLint/Lexer.php | 84 +- .../src/Seld/JsonLint/ParsingException.php | 7 + .../seld/jsonlint/tests/JsonParserTest.php | 230 - app/vendor/seld/jsonlint/tests/bom.json | 6 - app/vendor/seld/jsonlint/tests/bootstrap.php | 13 - app/vendor/seld/phar-utils/README.md | 6 + app/vendor/seld/phar-utils/composer.json | 2 +- app/vendor/seld/phar-utils/src/Linter.php | 110 + app/vendor/seld/phar-utils/src/Timestamps.php | 12 +- .../squizlabs/php_codesniffer/.gitattributes | 5 - .../squizlabs/php_codesniffer/.gitignore | 6 - .../squizlabs/php_codesniffer/README.md | 46 +- .../squizlabs/php_codesniffer/autoload.php | 68 +- .../squizlabs/php_codesniffer/composer.json | 2 +- .../squizlabs/php_codesniffer/phpcs.xml.dist | 144 - .../squizlabs/php_codesniffer/phpcs.xsd | 52 +- .../php_codesniffer/scripts/build-phar.php | 96 - .../squizlabs/php_codesniffer/src/Config.php | 204 +- .../src/Exceptions/RuntimeException.php | 2 +- .../php_codesniffer/src/Files/DummyFile.php | 2 +- .../php_codesniffer/src/Files/File.php | 856 +- .../php_codesniffer/src/Files/FileList.php | 6 +- .../php_codesniffer/src/Files/LocalFile.php | 13 +- .../php_codesniffer/src/Filters/Filter.php | 20 +- .../src/Filters/GitModified.php | 5 + .../php_codesniffer/src/Filters/GitStaged.php | 68 + .../squizlabs/php_codesniffer/src/Fixer.php | 107 +- .../src/Generators/Markdown.php | 2 +- .../php_codesniffer/src/Generators/Text.php | 50 +- .../php_codesniffer/src/Reporter.php | 11 +- .../php_codesniffer/src/Reports/Cbf.php | 1 + .../php_codesniffer/src/Reports/Gitblame.php | 3 +- .../php_codesniffer/src/Reports/Hgblame.php | 5 +- .../php_codesniffer/src/Reports/Info.php | 8 +- .../php_codesniffer/src/Reports/Json.php | 2 +- .../src/Reports/Notifysend.php | 5 +- .../php_codesniffer/src/Reports/Svnblame.php | 1 + .../php_codesniffer/src/Reports/Xml.php | 7 +- .../squizlabs/php_codesniffer/src/Ruleset.php | 108 +- .../squizlabs/php_codesniffer/src/Runner.php | 114 +- .../src/Sniffs/AbstractArraySniff.php | 166 +- .../src/Sniffs/AbstractPatternSniff.php | 15 +- .../src/Sniffs/AbstractScopeSniff.php | 22 +- .../src/Sniffs/AbstractVariableSniff.php | 17 +- .../php_codesniffer/src/Sniffs/Sniff.php | 2 +- .../DisallowYodaConditionsStandard.xml | 23 + .../Docs/Files/ExecutableFileStandard.xml | 7 + .../OneObjectStructurePerFileStandard.xml | 29 + .../Docs/Files/OneTraitPerFileStandard.xml | 29 + .../MultipleStatementAlignmentStandard.xml | 4 +- .../Docs/Formatting/SpaceAfterNotStandard.xml | 25 + .../AbstractClassNamePrefixStandard.xml | 23 + .../InterfaceNameSuffixStandard.xml | 23 + .../TraitNameSuffixStandard.xml | 23 + .../DisallowRequestSuperglobalStandard.xml | 7 + .../SpreadOperatorSpacingAfterStandard.xml | 34 + .../Sniffs/Arrays/ArrayIndentSniff.php | 38 +- .../Arrays/DisallowLongArraySyntaxSniff.php | 2 +- .../Arrays/DisallowShortArraySyntaxSniff.php | 2 +- .../Classes/DuplicateClassNameSniff.php | 3 +- .../Classes/OpeningBraceSameLineSniff.php | 4 +- .../AssignmentInConditionSniff.php | 4 +- .../CodeAnalysis/EmptyPHPStatementSniff.php | 162 + .../CodeAnalysis/EmptyStatementSniff.php | 3 +- .../ForLoopShouldBeWhileLoopSniff.php | 4 +- .../ForLoopWithTestFunctionCallSniff.php | 4 +- .../CodeAnalysis/JumbledIncrementerSniff.php | 4 +- .../UnconditionalIfStatementSniff.php | 6 +- .../UnnecessaryFinalModifierSniff.php | 4 +- .../UnusedFunctionParameterSniff.php | 115 +- .../UselessOverridingMethodSniff.php | 6 +- .../Sniffs/Commenting/DocCommentSniff.php | 16 +- .../Generic/Sniffs/Commenting/FixmeSniff.php | 2 +- .../Generic/Sniffs/Commenting/TodoSniff.php | 2 +- .../DisallowYodaConditionsSniff.php | 188 + .../InlineControlStructureSniff.php | 71 +- .../Generic/Sniffs/Debug/CSSLintSniff.php | 7 +- .../Sniffs/Debug/ClosureLinterSniff.php | 7 +- .../Generic/Sniffs/Debug/ESLintSniff.php | 8 +- .../Generic/Sniffs/Debug/JSHintSniff.php | 31 +- .../Sniffs/Files/ByteOrderMarkSniff.php | 4 +- .../Sniffs/Files/EndFileNewlineSniff.php | 2 +- .../Sniffs/Files/EndFileNoNewlineSniff.php | 18 +- .../Sniffs/Files/ExecutableFileSniff.php | 59 + .../Generic/Sniffs/Files/InlineHTMLSniff.php | 27 +- .../Generic/Sniffs/Files/LineEndingsSniff.php | 35 +- .../Generic/Sniffs/Files/LineLengthSniff.php | 44 +- .../Sniffs/Files/LowercasedFilenameSniff.php | 2 +- .../Sniffs/Files/OneClassPerFileSniff.php | 2 +- .../Sniffs/Files/OneInterfacePerFileSniff.php | 2 +- .../Files/OneObjectStructurePerFileSniff.php | 2 +- .../Sniffs/Files/OneTraitPerFileSniff.php | 2 +- .../DisallowMultipleStatementsSniff.php | 60 +- .../MultipleStatementAlignmentSniff.php | 49 +- .../Formatting/NoSpaceAfterCastSniff.php | 5 +- .../Sniffs/Formatting/SpaceAfterCastSniff.php | 112 +- .../Sniffs/Formatting/SpaceAfterNotSniff.php | 80 +- .../Formatting/SpaceBeforeCastSniff.php | 73 + .../CallTimePassByReferenceSniff.php | 28 +- .../FunctionCallArgumentSpacingSniff.php | 79 +- .../OpeningFunctionBraceBsdAllmanSniff.php | 4 +- ...ningFunctionBraceKernighanRitchieSniff.php | 3 +- .../Metrics/CyclomaticComplexitySniff.php | 2 +- .../Sniffs/Metrics/NestingLevelSniff.php | 2 +- .../AbstractClassNamePrefixSniff.php | 60 + .../CamelCapsFunctionNameSniff.php | 66 +- .../ConstructorNameSniff.php | 46 +- .../InterfaceNameSuffixSniff.php | 54 + .../TraitNameSuffixSniff.php | 54 + .../UpperCaseConstantNameSniff.php | 5 +- .../Sniffs/PHP/BacktickOperatorSniff.php | 2 +- .../PHP/CharacterBeforePHPOpeningTagSniff.php | 31 +- .../Generic/Sniffs/PHP/ClosingPHPTagSniff.php | 2 +- .../Sniffs/PHP/DeprecatedFunctionsSniff.php | 3 - .../PHP/DisallowAlternativePHPTagsSniff.php | 6 +- .../PHP/DisallowRequestSuperglobalSniff.php | 54 + .../Sniffs/PHP/DisallowShortOpenTagSniff.php | 4 +- .../Sniffs/PHP/DiscourageGotoSniff.php | 2 +- .../Sniffs/PHP/ForbiddenFunctionsSniff.php | 42 +- .../Sniffs/PHP/LowerCaseConstantSniff.php | 2 +- .../Sniffs/PHP/LowerCaseKeywordSniff.php | 6 +- .../Generic/Sniffs/PHP/LowerCaseTypeSniff.php | 280 +- .../Sniffs/PHP/NoSilencedErrorsSniff.php | 4 +- .../Sniffs/PHP/RequireStrictTypesSniff.php | 69 + .../Generic/Sniffs/PHP/SAPIUsageSniff.php | 11 +- .../Generic/Sniffs/PHP/SyntaxSniff.php | 7 +- .../Sniffs/PHP/UpperCaseConstantSniff.php | 2 +- .../Strings/UnnecessaryStringConcatSniff.php | 2 +- .../VersionControl/GitMergeConflictSniff.php | 225 + .../SubversionPropertiesSniff.php | 4 +- .../ArbitraryParenthesesSpacingSniff.php | 10 +- .../WhiteSpace/DisallowSpaceIndentSniff.php | 2 +- .../WhiteSpace/DisallowTabIndentSniff.php | 2 +- .../IncrementDecrementSpacingSniff.php | 170 + .../LanguageConstructSpacingSniff.php | 17 +- .../Sniffs/WhiteSpace/ScopeIndentSniff.php | 342 +- .../SpreadOperatorSpacingAfterSniff.php | 146 + .../Tests/Arrays/ArrayIndentUnitTest.inc | 42 + .../Arrays/ArrayIndentUnitTest.inc.fixed | 42 + .../Tests/Arrays/ArrayIndentUnitTest.php | 15 +- .../DisallowLongArraySyntaxUnitTest.1.inc | 5 + ...isallowLongArraySyntaxUnitTest.1.inc.fixed | 5 + .../Classes/DuplicateClassNameUnitTest.1.inc | 3 + .../Classes/DuplicateClassNameUnitTest.2.inc | 1 + .../Classes/DuplicateClassNameUnitTest.php | 6 +- .../AssignmentInConditionUnitTest.inc | 4 +- .../AssignmentInConditionUnitTest.php | 1 + .../EmptyPHPStatementUnitTest.inc | 86 + .../EmptyPHPStatementUnitTest.inc.fixed | 80 + .../EmptyPHPStatementUnitTest.php | 68 + .../CodeAnalysis/EmptyStatementUnitTest.inc | 4 +- .../CodeAnalysis/EmptyStatementUnitTest.php | 1 + .../ForLoopShouldBeWhileLoopUnitTest.inc | 2 +- .../UnusedFunctionParameterUnitTest.inc | 76 +- .../UnusedFunctionParameterUnitTest.php | 12 +- .../Tests/Commenting/DocCommentUnitTest.inc | 38 +- .../Commenting/DocCommentUnitTest.inc.fixed | 257 + .../Tests/Commenting/DocCommentUnitTest.js | 38 +- .../Commenting/DocCommentUnitTest.js.fixed | 255 + .../Tests/Commenting/DocCommentUnitTest.php | 24 + .../DisallowYodaConditionsUnitTest.inc | 175 + .../DisallowYodaConditionsUnitTest.php | 85 + ...c => InlineControlStructureUnitTest.1.inc} | 15 + ...nlineControlStructureUnitTest.1.inc.fixed} | 33 +- .../InlineControlStructureUnitTest.2.inc | 8 + .../InlineControlStructureUnitTest.3.inc | 4 + .../InlineControlStructureUnitTest.4.inc | 5 + .../InlineControlStructureUnitTest.5.inc | 4 + .../InlineControlStructureUnitTest.6.inc | 6 + .../InlineControlStructureUnitTest.7.inc | 16 + .../InlineControlStructureUnitTest.php | 15 +- .../Generic/Tests/Debug/CSSLintUnitTest.css | 6 + .../Generic/Tests/Debug/CSSLintUnitTest.php | 70 + .../Tests/Debug/ClosureLinterUnitTest.js | 6 + .../Tests/Debug/ClosureLinterUnitTest.php | 69 + .../Generic/Tests/Debug/ESLintUnitTest.js | 1 + .../Generic/Tests/Debug/ESLintUnitTest.php | 113 + .../Generic/Tests/Debug/JSHintUnitTest.js | 3 + .../Generic/Tests/Debug/JSHintUnitTest.php | 67 + .../Files/EndFileNewlineUnitTest.3.css.fixed | 2 + .../Files/EndFileNewlineUnitTest.3.inc.fixed | 2 + .../Files/EndFileNewlineUnitTest.3.js.fixed | 2 + .../Files/EndFileNewlineUnitTest.4.inc.fixed | 2 + .../EndFileNoNewlineUnitTest.1.css.fixed | 2 + .../EndFileNoNewlineUnitTest.1.inc.fixed | 2 + .../Files/EndFileNoNewlineUnitTest.1.js.fixed | 2 + .../EndFileNoNewlineUnitTest.2.css.fixed | 2 + .../EndFileNoNewlineUnitTest.2.inc.fixed | 3 + .../Files/EndFileNoNewlineUnitTest.2.js.fixed | 2 + .../EndFileNoNewlineUnitTest.6.inc.fixed | 2 + .../Files/EndFileNoNewlineUnitTest.7.inc | 6 + .../Tests/Files/EndFileNoNewlineUnitTest.php | 2 - .../Tests/Files/ExecutableFileUnitTest.1.inc} | 0 .../Tests/Files/ExecutableFileUnitTest.2.inc} | 0 .../Tests/Files/ExecutableFileUnitTest.php | 72 + .../Tests/Files/InlineHTMLUnitTest.6.inc | 2 + .../Tests/Files/InlineHTMLUnitTest.7.inc | 2 + .../Tests/Files/InlineHTMLUnitTest.php | 3 + .../Tests/Files/LineEndingsUnitTest.css | 6 +- .../Tests/Files/LineEndingsUnitTest.css.fixed | 3 + .../Tests/Files/LineEndingsUnitTest.inc | 36 +- .../Tests/Files/LineEndingsUnitTest.js | 4 +- .../Tests/Files/LineEndingsUnitTest.js.fixed | 2 + .../Tests/Files/LineLengthUnitTest.1.inc | 2 + .../Tests/Files/LineLengthUnitTest.3.inc | 9 + .../Tests/Files/LineLengthUnitTest.4.inc | 6 + .../Tests/Files/LineLengthUnitTest.php | 6 +- .../DisallowMultipleStatementsUnitTest.inc | 7 + ...sallowMultipleStatementsUnitTest.inc.fixed | 25 + .../DisallowMultipleStatementsUnitTest.php | 9 +- .../MultipleStatementAlignmentUnitTest.inc | 67 +- ...ltipleStatementAlignmentUnitTest.inc.fixed | 67 +- .../MultipleStatementAlignmentUnitTest.js | 2 +- ...ultipleStatementAlignmentUnitTest.js.fixed | 2 +- .../MultipleStatementAlignmentUnitTest.php | 7 + .../Formatting/NoSpaceAfterCastUnitTest.inc | 6 + .../NoSpaceAfterCastUnitTest.inc.fixed | 6 + .../Formatting/NoSpaceAfterCastUnitTest.php | 1 + .../Formatting/SpaceAfterCastUnitTest.inc | 54 +- .../SpaceAfterCastUnitTest.inc.fixed | 47 + .../Formatting/SpaceAfterCastUnitTest.php | 16 + .../Formatting/SpaceAfterNotUnitTest.inc | 83 +- .../SpaceAfterNotUnitTest.inc.fixed | 78 + .../Formatting/SpaceAfterNotUnitTest.php | 51 +- .../Formatting/SpaceBeforeCastUnitTest.inc | 65 + .../SpaceBeforeCastUnitTest.inc.fixed | 65 + .../Formatting/SpaceBeforeCastUnitTest.php | 78 + .../CallTimePassByReferenceUnitTest.inc | 6 + .../FunctionCallArgumentSpacingUnitTest.inc | 20 + ...ctionCallArgumentSpacingUnitTest.inc.fixed | 26 +- .../FunctionCallArgumentSpacingUnitTest.php | 8 +- .../Metrics/CyclomaticComplexityUnitTest.inc | 10 +- .../AbstractClassNamePrefixUnitTest.inc | 59 + .../AbstractClassNamePrefixUnitTest.php | 53 + .../CamelCapsFunctionNameUnitTest.inc | 18 + .../CamelCapsFunctionNameUnitTest.php | 2 + .../ConstructorNameUnitTest.inc | 35 +- .../ConstructorNameUnitTest.php | 1 + .../InterfaceNameSuffixUnitTest.inc | 27 + .../InterfaceNameSuffixUnitTest.php | 47 + .../TraitNameSuffixUnitTest.inc | 13 + .../TraitNameSuffixUnitTest.php | 50 + .../UpperCaseConstantNameUnitTest.inc | 2 + ...CharacterBeforePHPOpeningTagUnitTest.3.inc | 3 + .../Tests/PHP/DeprecatedFunctionsUnitTest.inc | 4 + .../Tests/PHP/DeprecatedFunctionsUnitTest.php | 58 + .../DisallowAlternativePHPTagsUnitTest.php | 2 +- .../DisallowRequestSuperglobalUnitTest.inc | 16 + .../DisallowRequestSuperglobalUnitTest.php | 51 + .../PHP/DisallowShortOpenTagUnitTest.php | 2 +- .../Tests/PHP/ForbiddenFunctionsUnitTest.inc | 2 +- .../Tests/PHP/LowerCaseKeywordUnitTest.inc | 8 + .../PHP/LowerCaseKeywordUnitTest.inc.fixed | 8 + .../Tests/PHP/LowerCaseKeywordUnitTest.php | 3 + .../Tests/PHP/LowerCaseTypeUnitTest.inc | 41 +- .../Tests/PHP/LowerCaseTypeUnitTest.inc.fixed | 41 +- .../Tests/PHP/LowerCaseTypeUnitTest.php | 21 + .../Tests/PHP/NoSilencedErrorsUnitTest.inc | 3 +- .../Tests/PHP/NoSilencedErrorsUnitTest.php | 5 +- .../PHP/RequireStrictTypesUnitTest.1.inc | 8 + .../PHP/RequireStrictTypesUnitTest.2.inc | 2 + .../Tests/PHP/RequireStrictTypesUnitTest.php | 56 + .../Generic/Tests/PHP/SAPIUsageUnitTest.inc | 1 + .../Generic/Tests/PHP/SyntaxUnitTest.php | 1 - .../GitMergeConflictUnitTest.1.css | 35 + .../GitMergeConflictUnitTest.1.inc | 61 + .../GitMergeConflictUnitTest.2.css | 32 + .../GitMergeConflictUnitTest.2.inc | 31 + .../GitMergeConflictUnitTest.3.inc | 43 + .../GitMergeConflictUnitTest.4.inc | 71 + .../GitMergeConflictUnitTest.5.inc | 34 + .../GitMergeConflictUnitTest.6.inc | 34 + .../GitMergeConflictUnitTest.js | 33 + .../GitMergeConflictUnitTest.php | 160 + .../SubversionPropertiesUnitTest.inc | 3 + .../SubversionPropertiesUnitTest.php | 61 + .../ArbitraryParenthesesSpacingUnitTest.inc | 4 + ...itraryParenthesesSpacingUnitTest.inc.fixed | 4 + .../ArbitraryParenthesesSpacingUnitTest.php | 3 + .../IncrementDecrementSpacingUnitTest.inc | 17 + ...ncrementDecrementSpacingUnitTest.inc.fixed | 16 + .../IncrementDecrementSpacingUnitTest.js | 17 + ...IncrementDecrementSpacingUnitTest.js.fixed | 16 + .../IncrementDecrementSpacingUnitTest.php | 66 + .../LanguageConstructSpacingUnitTest.inc | 5 +- ...LanguageConstructSpacingUnitTest.inc.fixed | 5 +- .../LanguageConstructSpacingUnitTest.php | 13 +- .../WhiteSpace/ScopeIndentUnitTest.1.inc | 254 + .../ScopeIndentUnitTest.1.inc.fixed | 254 + .../WhiteSpace/ScopeIndentUnitTest.2.inc | 254 + .../ScopeIndentUnitTest.2.inc.fixed | 254 + .../WhiteSpace/ScopeIndentUnitTest.3.inc | 11 + .../ScopeIndentUnitTest.3.inc.fixed | 11 + .../WhiteSpace/ScopeIndentUnitTest.4.inc | 6 + .../Tests/WhiteSpace/ScopeIndentUnitTest.php | 43 +- .../SpreadOperatorSpacingAfterUnitTest.inc | 73 + ...readOperatorSpacingAfterUnitTest.inc.fixed | 68 + .../SpreadOperatorSpacingAfterUnitTest.php | 58 + .../src/Standards/Generic/ruleset.xml | 4 +- .../Sniffs/CSS/BrowserSpecificStylesSniff.php | 2 +- .../Channels/DisallowSelfActionsSniff.php | 2 +- .../Sniffs/Channels/IncludeSystemSniff.php | 4 +- .../Objects/CreateWidgetTypeCallbackSniff.php | 7 +- .../Sniffs/PHP/AjaxNullComparisonSniff.php | 7 +- .../Sniffs/PHP/EvalObjectFactorySniff.php | 2 +- .../CreateWidgetTypeCallbackUnitTest.js | 2 +- .../Tests/PHP/AjaxNullComparisonUnitTest.inc | 5 +- .../Tests/PHP/AjaxNullComparisonUnitTest.php | 12 +- .../src/Standards/MySource/ruleset.xml | 26 +- .../Sniffs/Classes/ClassDeclarationSniff.php | 18 +- .../Sniffs/Commenting/ClassCommentSniff.php | 20 +- .../Sniffs/Commenting/FileCommentSniff.php | 38 +- .../Commenting/FunctionCommentSniff.php | 114 +- .../Sniffs/Commenting/InlineCommentSniff.php | 12 +- .../ControlSignatureSniff.php | 1 + .../MultiLineConditionSniff.php | 10 +- .../PEAR/Sniffs/Files/IncludingFileSniff.php | 2 +- .../Formatting/MultiLineAssignmentSniff.php | 6 +- .../Functions/FunctionCallSignatureSniff.php | 72 +- .../Functions/FunctionDeclarationSniff.php | 231 +- .../Functions/ValidDefaultValueSniff.php | 3 +- .../NamingConventions/ValidClassNameSniff.php | 8 +- .../ValidFunctionNameSniff.php | 71 +- .../ValidVariableNameSniff.php | 6 +- .../WhiteSpace/ObjectOperatorIndentSniff.php | 55 +- .../WhiteSpace/ScopeClosingBraceSniff.php | 2 +- ...est.inc => ClassDeclarationUnitTest.1.inc} | 30 + .../ClassDeclarationUnitTest.1.inc.fixed | 121 + .../Classes/ClassDeclarationUnitTest.2.inc | 11 + .../Classes/ClassDeclarationUnitTest.php | 62 +- .../Tests/Commenting/ClassCommentUnitTest.inc | 15 + ...UnitTest.inc => FileCommentUnitTest.1.inc} | 1 + .../Commenting/FileCommentUnitTest.2.inc | 9 + .../Tests/Commenting/FileCommentUnitTest.php | 69 +- .../Commenting/FunctionCommentUnitTest.inc | 59 + .../FunctionCommentUnitTest.inc.fixed | 59 + .../Commenting/FunctionCommentUnitTest.php | 3 +- .../ControlSignatureUnitTest.inc | 8 +- .../ControlSignatureUnitTest.php | 1 + .../FunctionCallSignatureUnitTest.inc | 159 +- .../FunctionCallSignatureUnitTest.inc.fixed | 165 +- .../FunctionCallSignatureUnitTest.php | 20 + .../Functions/FunctionDeclarationUnitTest.inc | 75 + .../FunctionDeclarationUnitTest.inc.fixed | 73 + .../Functions/FunctionDeclarationUnitTest.php | 23 + .../Functions/ValidDefaultValueUnitTest.inc | 20 + .../Functions/ValidDefaultValueUnitTest.php | 19 +- .../ValidFunctionNameUnitTest.inc | 15 + .../ValidFunctionNameUnitTest.php | 3 + .../ObjectOperatorIndentUnitTest.inc | 69 + .../ObjectOperatorIndentUnitTest.inc.fixed | 69 + .../ObjectOperatorIndentUnitTest.php | 37 +- .../WhiteSpace/ScopeClosingBraceUnitTest.inc | 8 + .../ScopeClosingBraceUnitTest.inc.fixed | 9 + .../WhiteSpace/ScopeClosingBraceUnitTest.php | 2 + .../src/Standards/PEAR/ruleset.xml | 66 +- .../Methods/CamelCapsMethodNameStandard.xml | 29 + .../Sniffs/Classes/ClassDeclarationSniff.php | 2 +- .../PSR1/Sniffs/Files/SideEffectsSniff.php | 21 +- .../Methods/CamelCapsMethodNameSniff.php | 16 +- .../Tests/Files/SideEffectsUnitTest.1.inc | 7 +- .../Tests/Files/SideEffectsUnitTest.13.inc | 2 + .../Tests/Files/SideEffectsUnitTest.14.inc | 2 + .../Tests/Files/SideEffectsUnitTest.15.inc | 2 + .../Tests/Files/SideEffectsUnitTest.16.inc | 2 + .../PSR1/Tests/Files/SideEffectsUnitTest.php | 2 + .../Methods/CamelCapsMethodNameUnitTest.inc | 10 +- .../Methods/CamelCapsMethodNameUnitTest.php | 1 + .../src/Standards/PSR1/ruleset.xml | 57 +- .../NullableTypeDeclarationStandard.xml | 45 + .../Classes/AnonClassDeclarationSniff.php | 242 + .../Classes/ClassInstantiationSniff.php | 25 +- .../Sniffs/Classes/ClosingBraceSniff.php | 66 + .../BooleanOperatorPlacementSniff.php | 229 + .../ControlStructureSpacingSniff.php | 192 + .../Sniffs/Files/DeclareStatementSniff.php | 256 + .../PSR12/Sniffs/Files/FileHeaderSniff.php | 428 + .../Sniffs/Files/ImportStatementSniff.php | 77 + .../PSR12/Sniffs/Files/OpenTagSniff.php | 73 + .../NullableTypeDeclarationSniff.php | 91 + .../Functions/ReturnTypeDeclarationSniff.php | 110 + .../Keywords/ShortFormTypeKeywordsSniff.php | 23 +- .../CompoundNamespaceDepthSniff.php | 2 +- .../Sniffs/Operators/OperatorSpacingSniff.php | 28 +- .../Properties/ConstantVisibilitySniff.php | 61 + .../Sniffs/Traits/UseDeclarationSniff.php | 700 ++ .../Classes/AnonClassDeclarationUnitTest.inc | 84 + .../AnonClassDeclarationUnitTest.inc.fixed | 86 + .../Classes/AnonClassDeclarationUnitTest.php | 71 + .../Classes/ClassInstantiationUnitTest.inc | 4 + .../ClassInstantiationUnitTest.inc.fixed | 4 + .../Classes/ClassInstantiationUnitTest.php | 2 + .../Tests/Classes/ClosingBraceUnitTest.inc | 47 + .../Tests/Classes/ClosingBraceUnitTest.php | 54 + .../BooleanOperatorPlacementUnitTest.inc | 131 + ...BooleanOperatorPlacementUnitTest.inc.fixed | 141 + .../BooleanOperatorPlacementUnitTest.php | 59 + .../ControlStructureSpacingUnitTest.inc | 100 + .../ControlStructureSpacingUnitTest.inc.fixed | 103 + .../ControlStructureSpacingUnitTest.php | 68 + .../Tests/Files/DeclareStatementUnitTest.inc | 50 + .../Files/DeclareStatementUnitTest.inc.fixed | 54 + .../Tests/Files/DeclareStatementUnitTest.php | 72 + .../Tests/Files/FileHeaderUnitTest.1.inc | 29 + .../Tests/Files/FileHeaderUnitTest.10.inc | 4 + .../Files/FileHeaderUnitTest.10.inc.fixed | 5 + .../Tests/Files/FileHeaderUnitTest.11.inc | 21 + .../Files/FileHeaderUnitTest.11.inc.fixed | 22 + .../Tests/Files/FileHeaderUnitTest.12.inc | 17 + .../Files/FileHeaderUnitTest.12.inc.fixed | 18 + .../Tests/Files/FileHeaderUnitTest.13.inc | 24 + .../Tests/Files/FileHeaderUnitTest.14.inc | 7 + .../Tests/Files/FileHeaderUnitTest.15.inc | 5 + .../Tests/Files/FileHeaderUnitTest.16.inc | 13 + .../Tests/Files/FileHeaderUnitTest.17.inc | 13 + .../Tests/Files/FileHeaderUnitTest.2.inc | 33 + .../Files/FileHeaderUnitTest.2.inc.fixed | 29 + .../Tests/Files/FileHeaderUnitTest.3.inc | 27 + .../Tests/Files/FileHeaderUnitTest.4.inc | 15 + .../Files/FileHeaderUnitTest.4.inc.fixed | 19 + .../Tests/Files/FileHeaderUnitTest.5.inc | 18 + .../Tests/Files/FileHeaderUnitTest.6.inc | 13 + .../Tests/Files/FileHeaderUnitTest.7.inc | 2 + .../Files/FileHeaderUnitTest.7.inc.fixed | 3 + .../Tests/Files/FileHeaderUnitTest.8.inc | 5 + .../Tests/Files/FileHeaderUnitTest.9.inc | 7 + .../PSR12/Tests/Files/FileHeaderUnitTest.php | 82 + .../Tests/Files/ImportStatementUnitTest.inc | 19 + .../Files/ImportStatementUnitTest.inc.fixed | 19 + .../Tests/Files/ImportStatementUnitTest.php | 52 + .../PSR12/Tests/Files/OpenTagUnitTest.1.inc | 3 + .../PSR12/Tests/Files/OpenTagUnitTest.2.inc | 1 + .../Tests/Files/OpenTagUnitTest.2.inc.fixed | 2 + .../PSR12/Tests/Files/OpenTagUnitTest.3.inc | 3 + .../PSR12/Tests/Files/OpenTagUnitTest.4.inc | 2 + .../PSR12/Tests/Files/OpenTagUnitTest.5.inc} | 0 .../PSR12/Tests/Files/OpenTagUnitTest.php | 55 + .../NullableTypeDeclarationUnitTest.inc | 87 + .../NullableTypeDeclarationUnitTest.inc.fixed | 85 + .../NullableTypeDeclarationUnitTest.php | 64 + .../ReturnTypeDeclarationUnitTest.inc | 66 + .../ReturnTypeDeclarationUnitTest.inc.fixed | 62 + .../ReturnTypeDeclarationUnitTest.php | 61 + .../ShortFormTypeKeywordsUnitTest.inc | 6 + .../ShortFormTypeKeywordsUnitTest.inc.fixed | 6 + .../ShortFormTypeKeywordsUnitTest.php | 8 +- .../Operators/OperatorSpacingUnitTest.inc | 17 + .../OperatorSpacingUnitTest.inc.fixed | 17 + .../Properties/ConstantVisibilityUnitTest.inc | 7 + .../Properties/ConstantVisibilityUnitTest.php | 48 + .../Tests/Traits/UseDeclarationUnitTest.inc | 209 + .../Traits/UseDeclarationUnitTest.inc.fixed | 203 + .../Tests/Traits/UseDeclarationUnitTest.php | 70 + .../src/Standards/PSR12/ruleset.xml | 146 +- .../Classes/PropertyDeclarationStandard.xml | 21 +- .../Sniffs/Classes/ClassDeclarationSniff.php | 182 +- .../Classes/PropertyDeclarationSniff.php | 93 +- .../ControlStructureSpacingSniff.php | 67 +- .../ElseIfDeclarationSniff.php | 2 +- .../SwitchDeclarationSniff.php | 162 +- .../PSR2/Sniffs/Files/ClosingTagSniff.php | 7 +- .../PSR2/Sniffs/Files/EndFileNewlineSniff.php | 2 +- .../Methods/FunctionCallSignatureSniff.php | 6 +- .../Methods/FunctionClosingBraceSniff.php | 4 +- .../Sniffs/Methods/MethodDeclarationSniff.php | 19 +- .../Namespaces/NamespaceDeclarationSniff.php | 9 +- .../Sniffs/Namespaces/UseDeclarationSniff.php | 18 +- .../Classes/ClassDeclarationUnitTest.inc | 76 + .../ClassDeclarationUnitTest.inc.fixed | 71 + .../Classes/ClassDeclarationUnitTest.php | 13 + .../Classes/PropertyDeclarationUnitTest.inc | 49 +- .../PropertyDeclarationUnitTest.inc.fixed | 70 + .../Classes/PropertyDeclarationUnitTest.php | 20 +- .../ControlStructureSpacingUnitTest.inc | 34 + .../ControlStructureSpacingUnitTest.inc.fixed | 34 + .../ControlStructureSpacingUnitTest.php | 10 +- .../SwitchDeclarationUnitTest.inc | 69 + .../SwitchDeclarationUnitTest.inc.fixed | 69 + .../SwitchDeclarationUnitTest.php | 2 + .../Files/ClosingTagUnitTest.5.inc.fixed | 1 + .../PSR2/Tests/Files/ClosingTagUnitTest.6.inc | 5 + .../Files/ClosingTagUnitTest.6.inc.fixed | 5 + .../PSR2/Tests/Files/ClosingTagUnitTest.7.inc | 5 + .../Files/ClosingTagUnitTest.7.inc.fixed | 5 + .../PSR2/Tests/Files/ClosingTagUnitTest.php | 4 + .../Files/EndFileNewlineUnitTest.1.inc.fixed | 2 + .../Files/EndFileNewlineUnitTest.10.inc.fixed | 2 + .../Files/EndFileNewlineUnitTest.3.inc.fixed | 2 + .../Files/EndFileNewlineUnitTest.6.inc.fixed | 2 + .../Files/EndFileNewlineUnitTest.7.inc.fixed | 2 + .../Files/EndFileNewlineUnitTest.9.inc.fixed | 2 + .../Methods/FunctionCallSignatureUnitTest.inc | 55 + .../FunctionCallSignatureUnitTest.inc.fixed | 58 + .../Methods/FunctionCallSignatureUnitTest.php | 38 +- .../Methods/MethodDeclarationUnitTest.inc | 49 + .../MethodDeclarationUnitTest.inc.fixed | 49 + .../Methods/MethodDeclarationUnitTest.php | 18 +- .../NamespaceDeclarationUnitTest.inc | 4 + .../NamespaceDeclarationUnitTest.inc.fixed | 4 + .../Namespaces/UseDeclarationUnitTest.2.inc | 4 + .../UseDeclarationUnitTest.2.inc.fixed | 8 + .../Namespaces/UseDeclarationUnitTest.php | 5 +- .../src/Standards/PSR2/ruleset.xml | 413 +- .../Docs/Arrays/ArrayDeclarationStandard.xml | 8 +- .../Arrays/ArrayBracketSpacingSniff.php | 2 +- .../Sniffs/Arrays/ArrayDeclarationSniff.php | 234 +- .../ClassDefinitionClosingBraceSpaceSniff.php | 46 +- .../CSS/ClassDefinitionNameSpacingSniff.php | 7 +- .../ClassDefinitionOpeningBraceSpaceSniff.php | 149 +- .../Squiz/Sniffs/CSS/ColonSpacingSniff.php | 2 +- .../Sniffs/CSS/ColourDefinitionSniff.php | 6 +- .../DisallowMultipleStyleDefinitionsSniff.php | 2 +- .../CSS/DuplicateClassDefinitionSniff.php | 5 +- .../CSS/DuplicateStyleDefinitionSniff.php | 7 +- .../Sniffs/CSS/EmptyClassDefinitionSniff.php | 2 +- .../Sniffs/CSS/EmptyStyleDefinitionSniff.php | 2 +- .../Squiz/Sniffs/CSS/ForbiddenStylesSniff.php | 6 +- .../Squiz/Sniffs/CSS/IndentationSniff.php | 8 +- .../CSS/LowercaseStyleDefinitionSniff.php | 2 +- .../Squiz/Sniffs/CSS/MissingColonSniff.php | 10 +- .../Squiz/Sniffs/CSS/NamedColoursSniff.php | 5 +- .../Squiz/Sniffs/CSS/OpacitySniff.php | 16 +- .../Sniffs/CSS/SemicolonSpacingSniff.php | 54 +- .../Squiz/Sniffs/CSS/ShorthandSizeSniff.php | 26 +- .../Sniffs/Classes/ClassDeclarationSniff.php | 2 +- .../Sniffs/Classes/ClassFileNameSniff.php | 3 +- .../Sniffs/Classes/DuplicatePropertySniff.php | 2 +- .../Classes/LowercaseClassKeywordsSniff.php | 32 +- .../Classes/SelfMemberReferenceSniff.php | 98 +- .../Sniffs/Classes/ValidClassNameSniff.php | 2 +- .../Sniffs/Commenting/BlockCommentSniff.php | 7 +- .../Sniffs/Commenting/ClassCommentSniff.php | 27 +- .../ClosingDeclarationCommentSniff.php | 2 +- .../Commenting/DocCommentAlignmentSniff.php | 4 +- .../Commenting/EmptyCatchCommentSniff.php | 2 +- .../Sniffs/Commenting/FileCommentSniff.php | 32 +- .../Commenting/FunctionCommentSniff.php | 95 +- .../FunctionCommentThrowTagSniff.php | 77 +- .../Sniffs/Commenting/InlineCommentSniff.php | 126 +- .../LongConditionClosingCommentSniff.php | 18 +- .../Commenting/PostStatementCommentSniff.php | 41 +- .../Commenting/VariableCommentSniff.php | 7 +- .../ControlSignatureSniff.php | 43 +- .../ElseIfDeclarationSniff.php | 2 +- .../ForEachLoopDeclarationSniff.php | 23 +- .../ForLoopDeclarationSniff.php | 265 +- .../InlineIfDeclarationSniff.php | 2 +- .../LowercaseDeclarationSniff.php | 12 +- .../SwitchDeclarationSniff.php | 2 +- .../Squiz/Sniffs/Debug/JSLintSniff.php | 11 +- .../Sniffs/Debug/JavaScriptLintSniff.php | 8 +- .../Squiz/Sniffs/Files/FileExtensionSniff.php | 4 +- .../Formatting/OperatorBracketSniff.php | 30 +- ...unctionDeclarationArgumentSpacingSniff.php | 336 +- .../FunctionDuplicateArgumentSniff.php | 4 +- .../Sniffs/Functions/GlobalFunctionSniff.php | 2 +- .../LowercaseFunctionKeywordsSniff.php | 29 +- .../MultiLineFunctionDeclarationSniff.php | 69 +- .../ValidFunctionNameSniff.php | 2 +- .../ValidVariableNameSniff.php | 39 +- .../DisallowObjectStringIndexSniff.php | 2 +- .../Objects/ObjectInstantiationSniff.php | 4 +- .../Sniffs/Objects/ObjectMemberCommaSniff.php | 4 +- .../ComparisonOperatorUsageSniff.php | 23 +- .../IncrementDecrementUsageSniff.php | 7 +- .../Operators/ValidLogicalOperatorsSniff.php | 2 +- .../Sniffs/PHP/CommentedOutCodeSniff.php | 4 +- .../PHP/DisallowBooleanStatementSniff.php | 2 +- .../PHP/DisallowComparisonAssignmentSniff.php | 19 +- .../Sniffs/PHP/DisallowInlineIfSniff.php | 2 +- .../PHP/DisallowMultipleAssignmentsSniff.php | 60 +- .../PHP/DisallowSizeFunctionsInLoopsSniff.php | 6 +- .../Squiz/Sniffs/PHP/EmbeddedPhpSniff.php | 6 +- .../Standards/Squiz/Sniffs/PHP/EvalSniff.php | 2 +- .../Squiz/Sniffs/PHP/GlobalKeywordSniff.php | 2 +- .../Squiz/Sniffs/PHP/HeredocSniff.php | 2 +- .../Squiz/Sniffs/PHP/InnerFunctionsSniff.php | 4 +- .../Sniffs/PHP/LowercasePHPFunctionsSniff.php | 91 +- .../Sniffs/PHP/NonExecutableCodeSniff.php | 11 +- .../Sniffs/Scope/MemberVarScopeSniff.php | 2 +- .../Squiz/Sniffs/Scope/MethodScopeSniff.php | 17 +- .../Sniffs/Scope/StaticThisUsageSniff.php | 45 +- .../Strings/ConcatenationSpacingSniff.php | 6 +- .../Sniffs/Strings/DoubleQuoteUsageSniff.php | 2 +- .../Sniffs/Strings/EchoedStringsSniff.php | 2 +- .../Sniffs/WhiteSpace/CastSpacingSniff.php | 2 +- .../ControlStructureSpacingSniff.php | 13 +- .../FunctionClosingBraceSpaceSniff.php | 2 +- .../FunctionOpeningBraceSpaceSniff.php | 4 +- .../WhiteSpace/FunctionSpacingSniff.php | 125 +- .../LanguageConstructSpacingSniff.php | 2 +- .../LogicalOperatorSpacingSniff.php | 10 +- .../WhiteSpace/MemberVarSpacingSniff.php | 11 +- .../WhiteSpace/ObjectOperatorSpacingSniff.php | 37 +- .../WhiteSpace/OperatorSpacingSniff.php | 143 +- .../WhiteSpace/PropertyLabelSpacingSniff.php | 2 +- .../WhiteSpace/ScopeClosingBraceSniff.php | 2 +- .../WhiteSpace/ScopeKeywordSpacingSniff.php | 61 +- .../WhiteSpace/SemicolonSpacingSniff.php | 12 +- .../WhiteSpace/SuperfluousWhitespaceSniff.php | 11 +- .../Arrays/ArrayDeclarationUnitTest.1.inc | 76 + .../ArrayDeclarationUnitTest.1.inc.fixed | 88 +- .../Arrays/ArrayDeclarationUnitTest.2.inc | 78 +- .../ArrayDeclarationUnitTest.2.inc.fixed | 86 +- .../Tests/Arrays/ArrayDeclarationUnitTest.php | 22 + ...assDefinitionClosingBraceSpaceUnitTest.css | 34 + ...initionClosingBraceSpaceUnitTest.css.fixed | 85 + ...assDefinitionClosingBraceSpaceUnitTest.php | 7 + .../ClassDefinitionNameSpacingUnitTest.css | 4 + ...assDefinitionOpeningBraceSpaceUnitTest.css | 65 + ...initionOpeningBraceSpaceUnitTest.css.fixed | 106 + ...assDefinitionOpeningBraceSpaceUnitTest.php | 9 + .../Tests/CSS/ColourDefinitionUnitTest.css | 6 + .../CSS/ColourDefinitionUnitTest.css.fixed | 16 + ...sallowMultipleStyleDefinitionsUnitTest.css | 5 + ...MultipleStyleDefinitionsUnitTest.css.fixed | 27 + ...sallowMultipleStyleDefinitionsUnitTest.php | 2 + .../CSS/DuplicateClassDefinitionUnitTest.css | 30 + .../CSS/DuplicateClassDefinitionUnitTest.php | 8 +- .../CSS/DuplicateStyleDefinitionUnitTest.css | 4 + .../CSS/ForbiddenStylesUnitTest.css.fixed | 18 + ...UnitTest.css => IndentationUnitTest.1.css} | 0 ....fixed => IndentationUnitTest.1.css.fixed} | 0 .../Squiz/Tests/CSS/IndentationUnitTest.2.css | 3 + .../Squiz/Tests/CSS/IndentationUnitTest.php | 50 +- .../Squiz/Tests/CSS/MissingColonUnitTest.css | 4 + .../Squiz/Tests/CSS/OpacityUnitTest.css | 8 + .../Squiz/Tests/CSS/OpacityUnitTest.css.fixed | 35 + .../Squiz/Tests/CSS/OpacityUnitTest.php | 3 + .../Tests/CSS/SemicolonSpacingUnitTest.css | 34 + .../CSS/SemicolonSpacingUnitTest.css.fixed | 58 + .../Tests/CSS/SemicolonSpacingUnitTest.php | 11 +- .../Squiz/Tests/CSS/ShorthandSizeUnitTest.css | 23 +- .../Tests/CSS/ShorthandSizeUnitTest.css.fixed | 41 + .../Squiz/Tests/CSS/ShorthandSizeUnitTest.php | 1 + .../Tests/Classes/ClassFileNameUnitTest.inc | 16 + .../Tests/Classes/ClassFileNameUnitTest.php | 18 +- .../LowercaseClassKeywordsUnitTest.inc | 3 +- .../LowercaseClassKeywordsUnitTest.inc.fixed | 13 + .../LowercaseClassKeywordsUnitTest.php | 1 + .../Classes/SelfMemberReferenceUnitTest.inc | 55 +- .../SelfMemberReferenceUnitTest.inc.fixed | 43 +- .../Classes/SelfMemberReferenceUnitTest.php | 12 +- .../Tests/Classes/ValidClassNameUnitTest.inc | 6 + .../Tests/Commenting/BlockCommentUnitTest.inc | 14 + .../Commenting/BlockCommentUnitTest.inc.fixed | 14 + .../Tests/Commenting/BlockCommentUnitTest.php | 2 + .../Tests/Commenting/ClassCommentUnitTest.inc | 8 + .../FileCommentUnitTest.1.inc.fixed | 43 + .../Tests/Commenting/FileCommentUnitTest.1.js | 48 +- ...Test.js => FileCommentUnitTest.1.js.fixed} | 8 +- .../Tests/Commenting/FileCommentUnitTest.2.js | 10 + .../Commenting/FileCommentUnitTest.4.inc | 3 + .../Commenting/FileCommentUnitTest.5.inc | 4 + .../Commenting/FileCommentUnitTest.6.inc | 12 + .../Commenting/FileCommentUnitTest.7.inc | 12 + .../Tests/Commenting/FileCommentUnitTest.php | 11 +- .../FunctionCommentThrowTagUnitTest.inc | 99 + .../Commenting/FunctionCommentUnitTest.inc | 43 +- .../FunctionCommentUnitTest.inc.fixed | 43 +- .../Commenting/FunctionCommentUnitTest.php | 186 +- .../Commenting/InlineCommentUnitTest.inc | 10 + .../InlineCommentUnitTest.inc.fixed | 10 + .../Commenting/InlineCommentUnitTest.php | 1 + .../LongConditionClosingCommentUnitTest.inc | 71 + ...gConditionClosingCommentUnitTest.inc.fixed | 71 + .../LongConditionClosingCommentUnitTest.js | 2 +- ...ngConditionClosingCommentUnitTest.js.fixed | 444 ++ .../LongConditionClosingCommentUnitTest.php | 55 +- ...t.js => PostStatementCommentUnitTest.1.js} | 8 +- ...> PostStatementCommentUnitTest.1.js.fixed} | 8 +- .../PostStatementCommentUnitTest.2.js | 2 + .../PostStatementCommentUnitTest.inc | 32 +- .../PostStatementCommentUnitTest.inc.fixed | 34 +- .../PostStatementCommentUnitTest.php | 9 +- .../Commenting/VariableCommentUnitTest.inc | 22 +- .../VariableCommentUnitTest.inc.fixed | 22 +- .../Commenting/VariableCommentUnitTest.php | 2 + .../ControlSignatureUnitTest.inc | 19 + .../ControlSignatureUnitTest.inc.fixed | 20 + .../ControlSignatureUnitTest.php | 1 + .../ElseIfDeclarationUnitTest.inc | 2 - .../ElseIfDeclarationUnitTest.inc.fixed | 14 + .../ForLoopDeclarationUnitTest.inc | 88 + .../ForLoopDeclarationUnitTest.inc.fixed | 95 + .../ForLoopDeclarationUnitTest.js | 78 + .../ForLoopDeclarationUnitTest.js.fixed | 91 + .../ForLoopDeclarationUnitTest.php | 98 +- .../InlineIfDeclarationUnitTest.php | 2 +- .../LowercaseDeclarationUnitTest.inc | 3 +- .../LowercaseDeclarationUnitTest.inc.fixed | 24 + .../LowercaseDeclarationUnitTest.php | 1 + .../SwitchDeclarationUnitTest.inc | 16 + .../SwitchDeclarationUnitTest.inc.fixed | 342 + .../SwitchDeclarationUnitTest.php | 139 +- .../Formatting/OperatorBracketUnitTest.inc | 30 + .../OperatorBracketUnitTest.inc.fixed | 30 + .../Formatting/OperatorBracketUnitTest.php | 7 + ...tionDeclarationArgumentSpacingUnitTest.inc | 24 +- ...clarationArgumentSpacingUnitTest.inc.fixed | 26 +- ...tionDeclarationArgumentSpacingUnitTest.php | 62 +- .../Functions/FunctionDeclarationUnitTest.inc | 1 + .../LowercaseFunctionKeywordsUnitTest.inc | 33 +- ...owercaseFunctionKeywordsUnitTest.inc.fixed | 28 + .../LowercaseFunctionKeywordsUnitTest.php | 14 +- .../MultiLineFunctionDeclarationUnitTest.inc | 20 + ...iLineFunctionDeclarationUnitTest.inc.fixed | 20 + .../MultiLineFunctionDeclarationUnitTest.php | 6 + .../ValidVariableNameUnitTest.inc | 21 +- .../ValidVariableNameUnitTest.php | 3 + .../Objects/ObjectInstantiationUnitTest.inc | 11 + .../Objects/ObjectMemberCommaUnitTest.js | 8 + .../ObjectMemberCommaUnitTest.js.fixed | 47 + .../Objects/ObjectMemberCommaUnitTest.php | 9 +- .../ComparisonOperatorUsageUnitTest.inc | 2 + .../IncrementDecrementUsageUnitTest.inc | 4 +- .../IncrementDecrementUsageUnitTest.php | 2 + .../DisallowComparisonAssignmentUnitTest.inc | 17 + .../DisallowComparisonAssignmentUnitTest.php | 2 + .../Tests/PHP/DisallowInlineIfUnitTest.inc | 8 + .../Tests/PHP/DisallowInlineIfUnitTest.php | 5 +- .../DisallowMultipleAssignmentsUnitTest.inc | 46 + .../DisallowMultipleAssignmentsUnitTest.php | 2 + .../DisallowSizeFunctionsInLoopsUnitTest.inc | 2 +- .../Tests/PHP/InnerFunctionsUnitTest.inc | 21 + .../Tests/PHP/InnerFunctionsUnitTest.php | 5 +- .../PHP/LowercasePHPFunctionsUnitTest.inc | 20 + .../LowercasePHPFunctionsUnitTest.inc.fixed | 43 + .../PHP/LowercasePHPFunctionsUnitTest.php | 8 +- .../Tests/PHP/NonExecutableCodeUnitTest.1.inc | 42 + .../Tests/Scope/MemberVarScopeUnitTest.inc | 4 +- .../Squiz/Tests/Scope/MethodScopeUnitTest.inc | 10 +- .../Squiz/Tests/Scope/MethodScopeUnitTest.php | 1 + .../Tests/Scope/StaticThisUsageUnitTest.inc | 60 + .../Tests/Scope/StaticThisUsageUnitTest.php | 7 + .../Tests/WhiteSpace/CastSpacingUnitTest.inc | 4 +- .../WhiteSpace/CastSpacingUnitTest.inc.fixed | 9 + .../Tests/WhiteSpace/CastSpacingUnitTest.php | 1 + .../ControlStructureSpacingUnitTest.inc | 10 + .../ControlStructureSpacingUnitTest.inc.fixed | 9 + .../ControlStructureSpacingUnitTest.php | 3 + .../FunctionOpeningBraceSpaceUnitTest.inc | 16 +- ...unctionOpeningBraceSpaceUnitTest.inc.fixed | 49 + ...FunctionOpeningBraceSpaceUnitTest.js.fixed | 109 + .../FunctionOpeningBraceSpaceUnitTest.php | 6 +- ...nc.fixed => FunctionSpacingUnitTest.1.inc} | 226 +- ...nc => FunctionSpacingUnitTest.1.inc.fixed} | 265 +- .../WhiteSpace/FunctionSpacingUnitTest.2.inc | 5 + .../FunctionSpacingUnitTest.2.inc.fixed | 7 + .../WhiteSpace/FunctionSpacingUnitTest.3.inc | 10 + .../FunctionSpacingUnitTest.3.inc.fixed | 7 + .../WhiteSpace/FunctionSpacingUnitTest.4.inc | 7 + .../WhiteSpace/FunctionSpacingUnitTest.5.inc | 8 + .../FunctionSpacingUnitTest.5.inc.fixed | 10 + .../WhiteSpace/FunctionSpacingUnitTest.6.inc | 13 + .../FunctionSpacingUnitTest.6.inc.fixed | 10 + .../WhiteSpace/FunctionSpacingUnitTest.7.inc | 10 + .../WhiteSpace/FunctionSpacingUnitTest.php | 129 +- .../LogicalOperatorSpacingUnitTest.inc | 2 - .../LogicalOperatorSpacingUnitTest.inc.fixed | 19 + .../LogicalOperatorSpacingUnitTest.js.fixed | 19 + .../WhiteSpace/MemberVarSpacingUnitTest.inc | 36 +- .../MemberVarSpacingUnitTest.inc.fixed | 37 +- .../WhiteSpace/MemberVarSpacingUnitTest.php | 1 + .../ObjectOperatorSpacingUnitTest.inc | 6 +- .../ObjectOperatorSpacingUnitTest.inc.fixed | 4 + .../ObjectOperatorSpacingUnitTest.php | 3 + .../WhiteSpace/OperatorSpacingUnitTest.inc | 223 + .../OperatorSpacingUnitTest.inc.fixed | 223 + .../WhiteSpace/OperatorSpacingUnitTest.js | 3 + .../OperatorSpacingUnitTest.js.fixed | 3 + .../WhiteSpace/OperatorSpacingUnitTest.php | 4 + .../WhiteSpace/ScopeClosingBraceUnitTest.inc | 9 + .../ScopeClosingBraceUnitTest.inc.fixed | 10 + .../WhiteSpace/ScopeClosingBraceUnitTest.php | 2 + .../ScopeKeywordSpacingUnitTest.inc | 46 +- .../ScopeKeywordSpacingUnitTest.inc.fixed | 43 + .../ScopeKeywordSpacingUnitTest.php | 30 +- .../WhiteSpace/SemicolonSpacingUnitTest.inc | 12 + .../SemicolonSpacingUnitTest.inc.fixed | 11 + .../WhiteSpace/SemicolonSpacingUnitTest.php | 1 + .../SuperfluousWhitespaceUnitTest.1.inc | 18 + .../SuperfluousWhitespaceUnitTest.1.inc.fixed | 17 + .../SuperfluousWhitespaceUnitTest.php | 4 +- .../src/Standards/Squiz/ruleset.xml | 3 +- .../Zend/Sniffs/Debug/CodeAnalyzerSniff.php | 8 +- .../Zend/Sniffs/Files/ClosingTagSniff.php | 1 + .../ValidVariableNameSniff.php | 7 +- .../Zend/Tests/Files/ClosingTagUnitTest.6.inc | 3 + .../Files/ClosingTagUnitTest.6.inc.fixed | 3 + .../Zend/Tests/Files/ClosingTagUnitTest.7.inc | 1 + .../Files/ClosingTagUnitTest.7.inc.fixed | 1 + .../Zend/Tests/Files/ClosingTagUnitTest.php | 9 +- .../ValidVariableNameUnitTest.inc | 12 + .../ValidVariableNameUnitTest.php | 53 +- .../src/Standards/Zend/ruleset.xml | 52 +- .../php_codesniffer/src/Tokenizers/CSS.php | 18 +- .../php_codesniffer/src/Tokenizers/JS.php | 28 +- .../php_codesniffer/src/Tokenizers/PHP.php | 1590 +++- .../src/Tokenizers/Tokenizer.php | 216 +- .../php_codesniffer/src/Util/Cache.php | 48 +- .../php_codesniffer/src/Util/Common.php | 80 +- .../php_codesniffer/src/Util/Standards.php | 14 +- .../php_codesniffer/src/Util/Timing.php | 2 +- .../php_codesniffer/src/Util/Tokens.php | 158 +- .../php_codesniffer/tests/AllTests.php | 5 +- .../tests/Core/AbstractMethodUnitTest.php | 140 + .../php_codesniffer/tests/Core/AllTests.php | 40 +- .../Autoloader/DetermineLoadedClassTest.php | 118 + .../tests/Core/Autoloader/TestFiles/A.inc | 3 + .../tests/Core/Autoloader/TestFiles/B.inc | 4 + .../tests/Core/Autoloader/TestFiles/C.inc | 4 + .../tests/Core/Autoloader/TestFiles/Sub/C.inc | 5 + .../tests/Core/ErrorSuppressionTest.php | 19 +- .../Core/File/FindEndOfStatementTest.inc | 78 +- .../Core/File/FindEndOfStatementTest.php | 392 +- .../Core/File/FindExtendedClassNameTest.inc | 1 - .../Core/File/FindExtendedClassNameTest.php | 63 +- .../FindImplementedInterfaceNamesTest.inc | 1 - .../FindImplementedInterfaceNamesTest.php | 63 +- .../Core/File/FindStartOfStatementTest.inc | 113 + .../Core/File/FindStartOfStatementTest.php | 471 ++ .../Core/File/GetMemberPropertiesTest.inc | 147 +- .../Core/File/GetMemberPropertiesTest.php | 491 +- .../Core/File/GetMethodParametersTest.inc | 96 +- .../Core/File/GetMethodParametersTest.php | 773 +- .../Core/File/GetMethodPropertiesTest.inc | 75 +- .../Core/File/GetMethodPropertiesTest.php | 653 +- .../tests/Core/File/IsReferenceTest.inc | 103 +- .../tests/Core/File/IsReferenceTest.php | 171 +- .../tests/Core/Filters/Filter/AcceptTest.php | 154 + .../tests/Core/Filters/Filter/AcceptTest.xml | 16 + .../RuleInclusionAbsoluteLinuxTest.php | 118 + .../RuleInclusionAbsoluteLinuxTest.xml | 11 + .../RuleInclusionAbsoluteWindowsTest.php | 119 + .../RuleInclusionAbsoluteWindowsTest.xml | 11 + .../Ruleset/RuleInclusionTest-include.xml | 10 + .../tests/Core/Ruleset/RuleInclusionTest.php | 297 + .../tests/Core/Ruleset/RuleInclusionTest.xml | 46 + .../Core/Sniffs/AbstractArraySniffTest.inc | 51 + .../Core/Sniffs/AbstractArraySniffTest.php | 290 + .../Sniffs/AbstractArraySniffTestable.php | 65 + .../AnonClassParenthesisOwnerTest.inc | 19 + .../AnonClassParenthesisOwnerTest.php | 144 + .../tests/Core/Tokenizer/AttributesTest.inc | 81 + .../tests/Core/Tokenizer/AttributesTest.php | 508 ++ .../Core/Tokenizer/BackfillFnTokenTest.inc | 187 + .../Core/Tokenizer/BackfillFnTokenTest.php | 733 ++ .../Core/Tokenizer/BackfillMatchTokenTest.inc | 319 + .../Core/Tokenizer/BackfillMatchTokenTest.php | 529 ++ .../BackfillNumericSeparatorTest.inc | 82 + .../BackfillNumericSeparatorTest.php | 380 + .../tests/Core/Tokenizer/BitwiseOrTest.inc | 92 + .../tests/Core/Tokenizer/BitwiseOrTest.php | 124 + .../Core/Tokenizer/DefaultKeywordTest.inc | 195 + .../Core/Tokenizer/DefaultKeywordTest.php | 275 + .../tests/Core/Tokenizer/DoubleArrowTest.inc | 281 + .../tests/Core/Tokenizer/DoubleArrowTest.php | 237 + .../tests/Core/Tokenizer/GotoLabelTest.inc | 53 + .../tests/Core/Tokenizer/GotoLabelTest.php | 171 + .../NamedFunctionCallArgumentsTest.inc | 398 + .../NamedFunctionCallArgumentsTest.php | 882 +++ .../Tokenizer/NullsafeObjectOperatorTest.inc | 29 + .../Tokenizer/NullsafeObjectOperatorTest.php | 140 + .../ScopeSettingWithNamespaceOperatorTest.inc | 19 + .../ScopeSettingWithNamespaceOperatorTest.php | 98 + .../tests/Core/Tokenizer/ShortArrayTest.inc | 97 + .../tests/Core/Tokenizer/ShortArrayTest.php | 132 + .../Tokenizer/StableCommentWhitespaceTest.inc | 139 + .../Tokenizer/StableCommentWhitespaceTest.php | 1056 +++ .../StableCommentWhitespaceWinTest.inc | 63 + .../StableCommentWhitespaceWinTest.php | 367 + .../UndoNamespacedNameSingleTokenTest.inc | 147 + .../UndoNamespacedNameSingleTokenTest.php | 1295 +++ .../php_codesniffer/tests/FileList.php | 94 + .../tests/Standards/AbstractSniffUnitTest.php | 16 +- .../tests/Standards/AllSniffs.php | 7 +- .../php_codesniffer/tests/bootstrap.php | 38 +- app/vendor/symfony/config/CHANGELOG.md | 2 +- app/vendor/symfony/config/ConfigCache.php | 4 +- .../config/ConfigCacheFactoryInterface.php | 2 +- .../symfony/config/Definition/ArrayNode.php | 37 +- .../symfony/config/Definition/BaseNode.php | 41 +- .../Builder/ArrayNodeDefinition.php | 58 +- .../config/Definition/Builder/ExprBuilder.php | 10 +- .../config/Definition/Builder/NodeBuilder.php | 20 +- .../Definition/Builder/NodeDefinition.php | 4 +- .../Builder/NormalizationBuilder.php | 6 +- .../Builder/NumericNodeDefinition.php | 4 +- .../Definition/Builder/ValidationBuilder.php | 2 +- .../Definition/Dumper/XmlReferenceDumper.php | 25 +- .../Definition/Dumper/YamlReferenceDumper.php | 16 +- .../symfony/config/Definition/EnumNode.php | 2 +- .../symfony/config/Definition/Processor.php | 6 +- .../config/Definition/PrototypedArrayNode.php | 60 +- .../DependencyInjection/ConfigCachePass.php | 2 +- .../Exception/FileLoaderLoadException.php | 2 +- .../FileLocatorFileNotFoundException.php | 2 +- app/vendor/symfony/config/FileLocator.php | 10 +- app/vendor/symfony/config/LICENSE | 2 +- .../symfony/config/Loader/FileLoader.php | 12 +- .../symfony/config/Loader/LoaderResolver.php | 4 +- app/vendor/symfony/config/README.md | 2 +- .../Resource/ClassExistenceResource.php | 135 +- .../config/Resource/ComposerResource.php | 10 +- .../config/Resource/DirectoryResource.php | 10 +- .../config/Resource/FileExistenceResource.php | 6 +- .../symfony/config/Resource/FileResource.php | 6 + .../symfony/config/Resource/GlobResource.php | 12 +- .../Resource/ReflectionClassResource.php | 86 +- .../config/ResourceCheckerConfigCache.php | 11 +- .../ResourceCheckerConfigCacheFactory.php | 4 +- .../config/Tests/ConfigCacheFactoryTest.php | 6 +- .../symfony/config/Tests/ConfigCacheTest.php | 20 +- .../config/Tests/Definition/ArrayNodeTest.php | 138 +- .../Tests/Definition/BooleanNodeTest.php | 34 +- .../Builder/ArrayNodeDefinitionTest.php | 93 +- .../Builder/BooleanNodeDefinitionTest.php | 6 +- .../Builder/EnumNodeDefinitionTest.php | 28 +- .../Definition/Builder/ExprBuilderTest.php | 56 +- .../Definition/Builder/NodeBuilderTest.php | 14 +- .../Builder/NumericNodeDefinitionTest.php | 49 +- .../Definition/Builder/TreeBuilderTest.php | 4 +- .../Dumper/XmlReferenceDumperTest.php | 2 +- .../Dumper/YamlReferenceDumperTest.php | 24 +- .../config/Tests/Definition/EnumNodeTest.php | 22 +- .../Tests/Definition/FinalizationTest.php | 28 +- .../config/Tests/Definition/FloatNodeTest.php | 40 +- .../Tests/Definition/IntegerNodeTest.php | 36 +- .../config/Tests/Definition/MergeTest.php | 94 +- .../Tests/Definition/NormalizationTest.php | 138 +- .../Definition/PrototypedArrayNodeTest.php | 183 +- .../Tests/Definition/ScalarNodeTest.php | 88 +- .../ConfigCachePassTest.php | 8 +- .../symfony/config/Tests/FileLocatorTest.php | 48 +- .../config/Tests/Fixtures/BadFileName.php | 9 + .../Configuration/ExampleConfiguration.php | 8 +- .../config/Tests/Fixtures/ParseError.php | 7 + .../Tests/Fixtures/Util/not_readable.xml} | 0 .../Tests/Loader/DelegatingLoaderTest.php | 22 +- .../config/Tests/Loader/FileLoaderTest.php | 14 +- .../Tests/Loader/LoaderResolverTest.php | 14 +- .../config/Tests/Loader/LoaderTest.php | 18 +- .../Resource/ClassExistenceResourceTest.php | 40 +- .../Tests/Resource/DirectoryResourceTest.php | 12 +- .../Resource/FileExistenceResourceTest.php | 2 +- .../Tests/Resource/FileResourceTest.php | 16 +- .../Tests/Resource/GlobResourceTest.php | 4 +- .../Resource/ReflectionClassResourceTest.php | 98 +- .../Tests/ResourceCheckerConfigCacheTest.php | 26 +- .../config/Tests/Util/XmlUtilsTest.php | 177 +- app/vendor/symfony/config/Util/XmlUtils.php | 45 +- app/vendor/symfony/config/composer.json | 7 +- app/vendor/symfony/config/phpunit.xml.dist | 2 +- app/vendor/symfony/console/Application.php | 163 +- app/vendor/symfony/console/CHANGELOG.md | 4 +- .../symfony/console/Command/Command.php | 70 +- .../symfony/console/Command/HelpCommand.php | 8 +- .../symfony/console/Command/ListCommand.php | 8 +- .../CommandLoader/CommandLoaderInterface.php | 9 + .../CommandLoader/ContainerCommandLoader.php | 9 + .../AddConsoleCommandPass.php | 16 +- .../Descriptor/ApplicationDescription.php | 39 +- .../symfony/console/Descriptor/Descriptor.php | 12 +- .../Descriptor/DescriptorInterface.php | 6 +- .../console/Descriptor/JsonDescriptor.php | 44 +- .../console/Descriptor/MarkdownDescriptor.php | 14 +- .../console/Descriptor/TextDescriptor.php | 32 +- .../console/Descriptor/XmlDescriptor.php | 19 +- .../console/Event/ConsoleExceptionEvent.php | 2 +- .../console/EventListener/ErrorListener.php | 22 +- .../Exception/CommandNotFoundException.php | 2 +- .../console/Formatter/OutputFormatter.php | 23 +- .../Formatter/OutputFormatterStyle.php | 106 +- .../OutputFormatterStyleInterface.php | 2 +- .../Formatter/OutputFormatterStyleStack.php | 2 +- .../console/Helper/DebugFormatterHelper.php | 6 +- .../console/Helper/DescriptorHelper.php | 15 +- .../console/Helper/FormatterHelper.php | 20 +- app/vendor/symfony/console/Helper/Helper.php | 22 +- .../symfony/console/Helper/HelperSet.php | 4 +- .../symfony/console/Helper/ProcessHelper.php | 4 + .../symfony/console/Helper/ProgressBar.php | 41 +- .../console/Helper/ProgressIndicator.php | 23 +- .../symfony/console/Helper/QuestionHelper.php | 153 +- .../console/Helper/SymfonyQuestionHelper.php | 12 +- app/vendor/symfony/console/Helper/Table.php | 65 +- .../symfony/console/Helper/TableCell.php | 7 +- .../symfony/console/Helper/TableSeparator.php | 2 +- .../symfony/console/Helper/TableStyle.php | 8 +- .../symfony/console/Input/ArgvInput.php | 35 +- .../symfony/console/Input/ArrayInput.php | 16 +- app/vendor/symfony/console/Input/Input.php | 12 +- .../symfony/console/Input/InputArgument.php | 14 +- .../console/Input/InputAwareInterface.php | 2 - .../symfony/console/Input/InputDefinition.php | 38 +- .../symfony/console/Input/InputInterface.php | 12 +- .../symfony/console/Input/InputOption.php | 18 +- .../symfony/console/Input/StringInput.php | 8 +- app/vendor/symfony/console/LICENSE | 2 +- .../symfony/console/Logger/ConsoleLogger.php | 17 +- .../symfony/console/Output/BufferedOutput.php | 2 +- .../symfony/console/Output/ConsoleOutput.php | 6 +- .../symfony/console/Output/StreamOutput.php | 8 +- .../console/Question/ChoiceQuestion.php | 16 +- .../console/Question/ConfirmationQuestion.php | 2 +- .../symfony/console/Question/Question.php | 23 +- app/vendor/symfony/console/README.md | 2 +- .../console/Resources/bin/hiddeninput.exe | Bin 9202 -> 9216 bytes .../symfony/console/Style/OutputStyle.php | 2 +- .../symfony/console/Style/StyleInterface.php | 1 - .../symfony/console/Style/SymfonyStyle.php | 26 +- app/vendor/symfony/console/Terminal.php | 106 +- .../console/Tester/ApplicationTester.php | 8 +- .../symfony/console/Tester/CommandTester.php | 22 +- .../symfony/console/Tests/ApplicationTest.php | 568 +- .../console/Tests/Command/CommandTest.php | 120 +- .../console/Tests/Command/HelpCommandTest.php | 34 +- .../console/Tests/Command/ListCommandTest.php | 16 +- .../Tests/Command/LockableTraitTest.php | 10 +- .../ContainerCommandLoaderTest.php | 20 +- .../FactoryCommandLoaderTest.php | 20 +- .../AddConsoleCommandPassTest.php | 54 +- .../Descriptor/AbstractDescriptorTest.php | 10 +- .../Descriptor/ApplicationDescriptionTest.php | 53 + .../Tests/Descriptor/JsonDescriptorTest.php | 6 +- .../Descriptor/MarkdownDescriptorTest.php | 4 +- .../Tests/Descriptor/ObjectsProvider.php | 38 +- .../Tests/Descriptor/TextDescriptorTest.php | 6 +- .../Tests/EventListener/ErrorListenerTest.php | 28 +- .../Tests/Fixtures/DescriptorCommand1.php | 2 +- .../Tests/Fixtures/DescriptorCommand4.php | 2 +- .../console/Tests/Fixtures/DummyOutput.php | 2 +- .../console/Tests/Fixtures/Foo1Command.php | 2 +- .../console/Tests/Fixtures/Foo2Command.php | 2 +- .../console/Tests/Fixtures/Foo6Command.php | 1 - .../console/Tests/Fixtures/FooCommand.php | 2 +- .../{TestTiti.php => FooHiddenCommand.php} | 8 +- .../console/Tests/Fixtures/FooOptCommand.php | 2 +- .../Fixtures/FooSubnamespaced1Command.php | 2 +- .../Fixtures/FooSubnamespaced2Command.php | 2 +- .../Style/SymfonyStyle/command/command_4.php | 4 +- .../Style/SymfonyStyle/command/command_5.php | 16 +- .../Style/SymfonyStyle/command/command_6.php | 4 +- .../Style/SymfonyStyle/command/command_7.php | 2 +- .../Style/SymfonyStyle/command/command_8.php | 20 +- .../Style/SymfonyStyle/command/command_9.php | 2 +- .../TestAmbiguousCommandRegistering.php | 22 + ...p => TestAmbiguousCommandRegistering2.php} | 9 +- .../console/Tests/Fixtures/TestCommand.php | 2 +- .../Tests/Fixtures/stream_output_file.txt} | 0 .../OutputFormatterStyleStackTest.php | 4 +- .../Formatter/OutputFormatterStyleTest.php | 16 +- .../Tests/Formatter/OutputFormatterTest.php | 34 +- .../Helper/AbstractQuestionHelperTest.php | 2 +- .../Tests/Helper/FormatterHelperTest.php | 2 +- .../console/Tests/Helper/HelperSetTest.php | 12 +- .../console/Tests/Helper/HelperTest.php | 44 +- .../Tests/Helper/ProcessHelperTest.php | 34 +- .../console/Tests/Helper/ProgressBarTest.php | 51 +- .../Tests/Helper/ProgressIndicatorTest.php | 50 +- .../Tests/Helper/QuestionHelperTest.php | 464 +- .../Helper/SymfonyQuestionHelperTest.php | 78 +- .../console/Tests/Helper/TableStyleTest.php | 6 +- .../console/Tests/Helper/TableTest.php | 492 +- .../console/Tests/Input/ArgvInputTest.php | 482 +- .../console/Tests/Input/ArrayInputTest.php | 142 +- .../console/Tests/Input/InputArgumentTest.php | 32 +- .../Tests/Input/InputDefinitionTest.php | 185 +- .../console/Tests/Input/InputOptionTest.php | 54 +- .../symfony/console/Tests/Input/InputTest.php | 86 +- .../console/Tests/Input/StringInputTest.php | 56 +- .../Tests/Logger/ConsoleLoggerTest.php | 100 +- .../console/Tests/Output/OutputTest.php | 26 +- .../console/Tests/Output/StreamOutputTest.php | 16 +- .../Tests/Question/ChoiceQuestionTest.php | 64 + .../Question/ConfirmationQuestionTest.php | 62 + .../console/Tests/Style/SymfonyStyleTest.php | 8 +- .../symfony/console/Tests/TerminalTest.php | 55 +- .../Tests/Tester/ApplicationTesterTest.php | 6 +- .../Tests/Tester/CommandTesterTest.php | 95 +- app/vendor/symfony/console/composer.json | 12 +- app/vendor/symfony/console/phpunit.xml.dist | 2 +- app/vendor/symfony/debug/.gitignore | 3 - app/vendor/symfony/debug/BufferingLogger.php | 15 +- app/vendor/symfony/debug/CHANGELOG.md | 57 +- app/vendor/symfony/debug/Debug.php | 14 +- app/vendor/symfony/debug/DebugClassLoader.php | 238 +- app/vendor/symfony/debug/ErrorHandler.php | 333 +- .../Exception/ClassNotFoundException.php | 6 +- .../debug/Exception/ContextErrorException.php | 40 - .../debug/Exception/FatalErrorException.php | 18 +- .../debug/Exception/FatalThrowableError.php | 24 +- .../debug/Exception/FlattenException.php | 186 +- .../debug/Exception/OutOfMemoryException.php | 4 + .../debug/Exception/SilencedErrorContext.php | 12 +- .../Exception/UndefinedFunctionException.php | 6 +- .../Exception/UndefinedMethodException.php | 6 +- app/vendor/symfony/debug/ExceptionHandler.php | 84 +- .../ClassNotFoundFatalErrorHandler.php | 111 +- .../FatalErrorHandlerInterface.php | 7 +- .../UndefinedFunctionFatalErrorHandler.php | 12 +- .../UndefinedMethodFatalErrorHandler.php | 10 +- app/vendor/symfony/debug/LICENSE | 2 +- app/vendor/symfony/debug/README.md | 27 +- .../symfony/debug/Resources/ext/README.md | 134 - .../symfony/debug/Resources/ext/config.m4 | 63 - .../symfony/debug/Resources/ext/config.w32 | 13 - .../debug/Resources/ext/php_symfony_debug.h | 60 - .../debug/Resources/ext/symfony_debug.c | 283 - .../debug/Resources/ext/tests/001.phpt | 155 - .../debug/Resources/ext/tests/002.phpt | 65 - .../debug/Resources/ext/tests/002_1.phpt | 48 - .../debug/Resources/ext/tests/003.phpt | 87 - .../debug/Tests/DebugClassLoaderTest.php | 438 -- .../symfony/debug/Tests/ErrorHandlerTest.php | 586 -- .../Tests/Exception/FlattenExceptionTest.php | 302 - .../debug/Tests/ExceptionHandlerTest.php | 133 - .../ClassNotFoundFatalErrorHandlerTest.php | 176 - ...UndefinedFunctionFatalErrorHandlerTest.php | 81 - .../UndefinedMethodFatalErrorHandlerTest.php | 76 - .../debug/Tests/Fixtures/AnnotatedClass.php | 13 - .../debug/Tests/Fixtures/ClassAlias.php | 3 - .../debug/Tests/Fixtures/DeprecatedClass.php | 12 - .../Tests/Fixtures/DeprecatedInterface.php | 12 - .../Tests/Fixtures/ExtendedFinalMethod.php | 19 - .../debug/Tests/Fixtures/FinalClass.php | 10 - .../debug/Tests/Fixtures/FinalMethod.php | 24 - .../Tests/Fixtures/FinalMethod2Trait.php | 10 - .../debug/Tests/Fixtures/InternalClass.php | 15 - .../Tests/Fixtures/InternalInterface.php | 10 - .../debug/Tests/Fixtures/InternalTrait.php | 10 - .../debug/Tests/Fixtures/InternalTrait2.php | 23 - .../Tests/Fixtures/NonDeprecatedInterface.php | 7 - .../debug/Tests/Fixtures/PEARClass.php | 5 - .../symfony/debug/Tests/Fixtures/Throwing.php | 3 - .../debug/Tests/Fixtures/ToStringThrower.php | 24 - .../Fixtures/TraitWithInternalMethod.php | 13 - .../debug/Tests/Fixtures/casemismatch.php | 7 - .../debug/Tests/Fixtures/notPsr0Bis.php | 7 - .../Tests/Fixtures/psr4/Psr4CaseMismatch.php | 7 - .../debug/Tests/Fixtures/reallyNotPsr0.php | 7 - .../debug/Tests/Fixtures2/RequiredTwice.php | 7 - app/vendor/symfony/debug/Tests/HeaderMock.php | 38 - .../debug/Tests/phpt/debug_class_loader.phpt | 27 - .../Tests/phpt/decorate_exception_hander.phpt | 46 - .../debug/Tests/phpt/exception_rethrown.phpt | 35 - .../phpt/fatal_with_nested_handlers.phpt | 42 - app/vendor/symfony/debug/composer.json | 17 +- app/vendor/symfony/debug/phpunit.xml.dist | 33 - app/vendor/symfony/filesystem/.gitignore | 3 - app/vendor/symfony/filesystem/CHANGELOG.md | 17 + .../Exception/ExceptionInterface.php | 2 +- .../Exception/FileNotFoundException.php | 2 +- .../filesystem/Exception/IOException.php | 2 +- .../Exception/IOExceptionInterface.php | 2 +- .../Exception/InvalidArgumentException.php} | 15 +- app/vendor/symfony/filesystem/Filesystem.php | 272 +- app/vendor/symfony/filesystem/LICENSE | 2 +- app/vendor/symfony/filesystem/LockHandler.php | 121 - app/vendor/symfony/filesystem/README.md | 10 +- .../filesystem/Tests/ExceptionTest.php | 47 - .../filesystem/Tests/FilesystemTest.php | 1674 ---- .../filesystem/Tests/FilesystemTestCase.php | 166 - .../Tests/Fixtures/MockStream/MockStream.php | 46 - .../filesystem/Tests/LockHandlerTest.php | 148 - app/vendor/symfony/filesystem/composer.json | 14 +- .../symfony/filesystem/phpunit.xml.dist | 30 - app/vendor/symfony/finder/.gitignore | 3 - app/vendor/symfony/finder/CHANGELOG.md | 24 + .../symfony/finder/Comparator/Comparator.php | 15 +- .../finder/Comparator/DateComparator.php | 4 +- .../finder/Comparator/NumberComparator.php | 8 +- .../Exception/DirectoryNotFoundException.php} | 14 +- .../finder/Exception/ExceptionInterface.php | 25 - app/vendor/symfony/finder/Finder.php | 253 +- app/vendor/symfony/finder/Gitignore.php | 83 + app/vendor/symfony/finder/Glob.php | 11 +- .../finder/Iterator/CustomFilterIterator.php | 7 +- .../Iterator/DateRangeFilterIterator.php | 5 +- .../Iterator/DepthRangeFilterIterator.php | 7 +- .../ExcludeDirectoryFilterIterator.php | 21 +- .../Iterator/FileTypeFilterIterator.php | 9 +- .../Iterator/FilecontentFilterIterator.php | 3 +- .../Iterator/FilenameFilterIterator.php | 3 +- .../finder/Iterator/FilterIterator.php | 60 - .../symfony/finder/Iterator/LazyIterator.php | 32 + .../Iterator/MultiplePcreFilterIterator.php | 28 +- .../finder/Iterator/PathFilterIterator.php | 3 +- .../Iterator/RecursiveDirectoryIterator.php | 29 +- .../Iterator/SizeRangeFilterIterator.php | 5 +- .../finder/Iterator/SortableIterator.php | 65 +- app/vendor/symfony/finder/LICENSE | 2 +- app/vendor/symfony/finder/README.md | 10 +- app/vendor/symfony/finder/SplFileInfo.php | 9 +- .../Tests/Comparator/ComparatorTest.php | 65 - .../Tests/Comparator/DateComparatorTest.php | 64 - .../Tests/Comparator/NumberComparatorTest.php | 108 - .../symfony/finder/Tests/FinderTest.php | 737 -- .../symfony/finder/Tests/Fixtures/.dot/a | 0 .../finder/Tests/Fixtures/.dot/b/c.neon | 0 .../finder/Tests/Fixtures/.dot/b/d.neon | 0 .../finder/Tests/Fixtures/A/B/C/abc.dat | 0 .../symfony/finder/Tests/Fixtures/A/B/ab.dat | 0 .../symfony/finder/Tests/Fixtures/A/a.dat | 0 .../Tests/Fixtures/copy/A/B/C/abc.dat.copy | 0 .../Tests/Fixtures/copy/A/B/ab.dat.copy | 0 .../finder/Tests/Fixtures/copy/A/a.dat.copy | 0 .../symfony/finder/Tests/Fixtures/dolor.txt | 2 - .../symfony/finder/Tests/Fixtures/ipsum.txt | 2 - .../symfony/finder/Tests/Fixtures/lorem.txt | 2 - .../symfony/finder/Tests/Fixtures/one/.dot | 1 - .../symfony/finder/Tests/Fixtures/one/a | 0 .../finder/Tests/Fixtures/one/b/c.neon | 0 .../finder/Tests/Fixtures/one/b/d.neon | 0 .../Fixtures/r+e.gex[c]a(r)s/dir/bar.dat | 0 .../finder/Tests/Fixtures/with space/foo.txt | 0 app/vendor/symfony/finder/Tests/GlobTest.php | 95 - .../Iterator/CustomFilterIteratorTest.php | 46 - .../Iterator/DateRangeFilterIteratorTest.php | 74 - .../Iterator/DepthRangeFilterIteratorTest.php | 83 - .../ExcludeDirectoryFilterIteratorTest.php | 80 - .../Iterator/FileTypeFilterIteratorTest.php | 73 - .../FilecontentFilterIteratorTest.php | 86 - .../Iterator/FilenameFilterIteratorTest.php | 54 - .../Tests/Iterator/FilterIteratorTest.php | 53 - .../finder/Tests/Iterator/Iterator.php | 55 - .../Tests/Iterator/IteratorTestCase.php | 100 - .../Tests/Iterator/MockFileListIterator.php | 21 - .../finder/Tests/Iterator/MockSplFileInfo.php | 132 - .../MultiplePcreFilterIteratorTest.php | 71 - .../Tests/Iterator/PathFilterIteratorTest.php | 82 - .../Tests/Iterator/RealIteratorTestCase.php | 119 - .../RecursiveDirectoryIteratorTest.php | 59 - .../Iterator/SizeRangeFilterIteratorTest.php | 69 - .../Tests/Iterator/SortableIteratorTest.php | 183 - app/vendor/symfony/finder/composer.json | 12 +- app/vendor/symfony/finder/phpunit.xml.dist | 30 - app/vendor/symfony/polyfill-ctype/LICENSE | 2 +- .../symfony/polyfill-ctype/bootstrap.php | 24 + .../symfony/polyfill-ctype/bootstrap80.php | 46 + .../symfony/polyfill-ctype/composer.json | 8 +- app/vendor/symfony/polyfill-mbstring/LICENSE | 2 +- .../symfony/polyfill-mbstring/Mbstring.php | 235 +- .../symfony/polyfill-mbstring/README.md | 2 +- .../Resources/unidata/lowerCase.php | 310 +- .../Resources/unidata/upperCase.php | 446 +- .../symfony/polyfill-mbstring/bootstrap.php | 165 +- .../symfony/polyfill-mbstring/bootstrap80.php | 143 + .../symfony/polyfill-mbstring/composer.json | 8 +- app/vendor/symfony/polyfill-php72/LICENSE | 19 + app/vendor/symfony/polyfill-php72/Php72.php | 217 + app/vendor/symfony/polyfill-php72/README.md | 28 + .../symfony/polyfill-php72/bootstrap.php | 57 + .../symfony/polyfill-php72/composer.json | 35 + .../polyfill-php80}/LICENSE | 10 +- app/vendor/symfony/polyfill-php80/Php80.php | 105 + app/vendor/symfony/polyfill-php80/README.md | 24 + .../Resources/stubs/Attribute.php | 22 + .../Resources/stubs/Stringable.php | 11 + .../Resources/stubs/UnhandledMatchError.php | 5 + .../Resources/stubs/ValueError.php | 5 + .../symfony/polyfill-php80/bootstrap.php | 42 + .../symfony/polyfill-php80/composer.json | 40 + app/vendor/symfony/process/.gitignore | 3 - app/vendor/symfony/process/CHANGELOG.md | 59 + .../process/Exception/ExceptionInterface.php | 2 +- .../Exception/ProcessSignaledException.php | 41 + .../Exception/ProcessTimedOutException.php | 6 +- .../symfony/process/ExecutableFinder.php | 26 +- app/vendor/symfony/process/InputStream.php | 18 +- app/vendor/symfony/process/LICENSE | 2 +- .../symfony/process/PhpExecutableFinder.php | 39 +- app/vendor/symfony/process/PhpProcess.php | 28 +- .../symfony/process/Pipes/AbstractPipes.php | 30 +- .../symfony/process/Pipes/PipesInterface.php | 18 +- .../symfony/process/Pipes/UnixPipes.php | 77 +- .../symfony/process/Pipes/WindowsPipes.php | 125 +- app/vendor/symfony/process/Process.php | 683 +- app/vendor/symfony/process/ProcessBuilder.php | 280 - app/vendor/symfony/process/ProcessUtils.php | 58 +- app/vendor/symfony/process/README.md | 10 +- .../process/Tests/ExecutableFinderTest.php | 163 - .../process/Tests/NonStopableProcess.php | 47 - .../process/Tests/PhpExecutableFinderTest.php | 72 - .../symfony/process/Tests/PhpProcessTest.php | 48 - .../PipeStdinInStdoutStdErrStreamSelect.php | 72 - .../process/Tests/ProcessBuilderTest.php | 226 - .../Tests/ProcessFailedExceptionTest.php | 137 - .../symfony/process/Tests/ProcessTest.php | 1615 ---- .../process/Tests/ProcessUtilsTest.php | 53 - app/vendor/symfony/process/composer.json | 12 +- app/vendor/symfony/process/phpunit.xml.dist | 30 - app/vendor/symfony/var-dumper/.gitignore | 3 - app/vendor/symfony/var-dumper/CHANGELOG.md | 42 +- .../symfony/var-dumper/Caster/AmqpCaster.php | 96 +- .../symfony/var-dumper/Caster/ArgsStub.php | 20 +- .../symfony/var-dumper/Caster/Caster.php | 83 +- .../symfony/var-dumper/Caster/ClassStub.php | 47 +- .../symfony/var-dumper/Caster/ConstStub.php | 7 +- .../symfony/var-dumper/Caster/CutStub.php | 5 + .../symfony/var-dumper/Caster/DOMCaster.php | 160 +- .../symfony/var-dumper/Caster/DateCaster.php | 45 +- .../var-dumper/Caster/DoctrineCaster.php | 14 +- .../symfony/var-dumper/Caster/DsCaster.php | 70 + .../symfony/var-dumper/Caster/DsPairStub.php | 28 + .../symfony/var-dumper/Caster/EnumStub.php | 2 +- .../var-dumper/Caster/ExceptionCaster.php | 139 +- .../symfony/var-dumper/Caster/FrameStub.php | 2 +- .../symfony/var-dumper/Caster/GmpCaster.php | 32 + .../var-dumper/Caster/ImagineCaster.php | 37 + .../symfony/var-dumper/Caster/ImgStub.php | 26 + .../symfony/var-dumper/Caster/IntlCaster.php | 172 + .../symfony/var-dumper/Caster/LinkStub.php | 20 +- .../var-dumper/Caster/MemcachedCaster.php | 81 + .../symfony/var-dumper/Caster/MongoCaster.php | 38 - .../symfony/var-dumper/Caster/PdoCaster.php | 32 +- .../symfony/var-dumper/Caster/PgSqlCaster.php | 94 +- .../var-dumper/Caster/ProxyManagerCaster.php | 33 + .../symfony/var-dumper/Caster/RedisCaster.php | 125 +- .../var-dumper/Caster/ReflectionCaster.php | 209 +- .../var-dumper/Caster/ResourceCaster.php | 35 +- .../symfony/var-dumper/Caster/SplCaster.php | 102 +- .../symfony/var-dumper/Caster/StubCaster.php | 8 +- .../var-dumper/Caster/SymfonyCaster.php | 34 +- .../symfony/var-dumper/Caster/TraceStub.php | 2 +- .../symfony/var-dumper/Caster/UuidCaster.php | 30 + .../var-dumper/Caster/XmlReaderCaster.php | 20 +- .../var-dumper/Caster/XmlResourceCaster.php | 54 +- .../var-dumper/Cloner/AbstractCloner.php | 303 +- .../symfony/var-dumper/Cloner/Cursor.php | 10 +- app/vendor/symfony/var-dumper/Cloner/Data.php | 135 +- .../var-dumper/Cloner/DumperInterface.php | 28 +- app/vendor/symfony/var-dumper/Cloner/Stub.php | 50 +- .../symfony/var-dumper/Cloner/VarCloner.php | 116 +- .../Command/Descriptor/CliDescriptor.php | 88 + .../Descriptor/DumpDescriptorInterface.php | 23 + .../Command/Descriptor/HtmlDescriptor.php | 119 + .../var-dumper/Command/ServerDumpCommand.php | 101 + .../var-dumper/Dumper/AbstractDumper.php | 41 +- .../symfony/var-dumper/Dumper/CliDumper.php | 154 +- .../ContextProvider/CliContextProvider.php | 32 + .../ContextProviderInterface.php | 25 + .../RequestContextProvider.php | 51 + .../ContextProvider/SourceContextProvider.php | 126 + .../Dumper/ContextualizedDumper.php | 43 + .../symfony/var-dumper/Dumper/HtmlDumper.php | 218 +- .../var-dumper/Dumper/ServerDumper.php | 53 + .../Exception/ThrowingCasterException.php | 4 +- app/vendor/symfony/var-dumper/LICENSE | 2 +- app/vendor/symfony/var-dumper/README.md | 14 +- .../var-dumper/Resources/bin/var-dump-server | 63 + .../Resources/css/htmlDescriptor.css | 130 + .../var-dumper/Resources/functions/dump.php | 17 +- .../var-dumper/Resources/js/htmlDescriptor.js | 10 + .../symfony/var-dumper/Server/Connection.php | 95 + .../symfony/var-dumper/Server/DumpServer.php | 107 + .../var-dumper/Test/VarDumperTestTrait.php | 61 +- .../var-dumper/Tests/Caster/CasterTest.php | 181 - .../Tests/Caster/DateCasterTest.php | 426 - .../Tests/Caster/ExceptionCasterTest.php | 230 - .../var-dumper/Tests/Caster/PdoCasterTest.php | 64 - .../Tests/Caster/RedisCasterTest.php | 84 - .../Tests/Caster/ReflectionCasterTest.php | 242 - .../var-dumper/Tests/Caster/SplCasterTest.php | 213 - .../Tests/Caster/StubCasterTest.php | 192 - .../Tests/Caster/XmlReaderCasterTest.php | 248 - .../var-dumper/Tests/Cloner/DataTest.php | 115 - .../var-dumper/Tests/Cloner/VarClonerTest.php | 437 -- .../var-dumper/Tests/Dumper/CliDumperTest.php | 591 -- .../var-dumper/Tests/Dumper/FunctionsTest.php | 57 - .../Tests/Dumper/HtmlDumperTest.php | 168 - .../Tests/Fixtures/FooInterface.php | 11 - .../Tests/Fixtures/GeneratorDemo.php | 21 - .../Tests/Fixtures/NotLoadableClass.php | 7 - .../var-dumper/Tests/Fixtures/Twig.php | 38 - .../var-dumper/Tests/Fixtures/dumb-var.php | 40 - .../var-dumper/Tests/Fixtures/xml_reader.xml | 10 - .../Tests/Test/VarDumperTestTraitTest.php | 41 - app/vendor/symfony/var-dumper/VarDumper.php | 22 +- app/vendor/symfony/var-dumper/composer.json | 27 +- .../symfony/var-dumper/phpunit.xml.dist | 33 - app/vendor/symfony/yaml/CHANGELOG.md | 2 +- .../symfony/yaml/Command/LintCommand.php | 25 +- app/vendor/symfony/yaml/Dumper.php | 40 +- app/vendor/symfony/yaml/Escaper.php | 14 +- .../symfony/yaml/Exception/ParseException.php | 2 +- app/vendor/symfony/yaml/Inline.php | 212 +- app/vendor/symfony/yaml/LICENSE | 2 +- app/vendor/symfony/yaml/Parser.php | 124 +- app/vendor/symfony/yaml/README.md | 2 +- .../yaml/Tests/Command/LintCommandTest.php | 26 +- app/vendor/symfony/yaml/Tests/DumperTest.php | 316 +- .../yaml/Tests/Fixtures/YtsAnchorAlias.yml | 4 +- .../yaml/Tests/Fixtures/YtsBasicTests.yml | 52 +- .../yaml/Tests/Fixtures/YtsBlockMapping.yml | 14 +- .../Tests/Fixtures/YtsDocumentSeparator.yml | 8 +- .../yaml/Tests/Fixtures/YtsErrorTests.yml | 2 +- .../Tests/Fixtures/YtsFlowCollections.yml | 16 +- .../yaml/Tests/Fixtures/YtsFoldedScalars.yml | 26 +- .../Tests/Fixtures/YtsNullsAndEmpties.yml | 8 +- .../Fixtures/YtsSpecificationExamples.yml | 204 +- .../yaml/Tests/Fixtures/YtsTypeTransfers.yml | 62 +- .../Tests/Fixtures/booleanMappingKeys.yml | 4 +- .../yaml/Tests/Fixtures/escapedCharacters.yml | 8 +- .../Fixtures/legacyBooleanMappingKeys.yml | 8 +- .../Tests/Fixtures/legacyNullMappingKey.yml | 4 +- ...nes_as_literal_block_for_tagged_values.yml | 2 + .../yaml/Tests/Fixtures/nullMappingKey.yml | 4 +- .../Tests/Fixtures/numericMappingKeys.yml | 6 +- .../yaml/Tests/Fixtures/sfComments.yml | 28 +- .../symfony/yaml/Tests/Fixtures/sfCompact.yml | 108 +- .../yaml/Tests/Fixtures/sfMergeKey.yml | 26 +- .../symfony/yaml/Tests/Fixtures/sfObjects.yml | 2 +- .../symfony/yaml/Tests/Fixtures/sfQuotes.yml | 10 +- .../symfony/yaml/Tests/Fixtures/sfTests.yml | 32 +- .../Tests/Fixtures/unindentedCollections.yml | 14 +- app/vendor/symfony/yaml/Tests/InlineTest.php | 693 +- app/vendor/symfony/yaml/Tests/ParserTest.php | 1007 ++- app/vendor/symfony/yaml/Tests/YamlTest.php | 18 +- app/vendor/symfony/yaml/Yaml.php | 10 +- app/vendor/symfony/yaml/composer.json | 7 +- app/vendor/symfony/yaml/phpunit.xml.dist | 2 +- app/vendor/twig/twig/.gitattributes | 2 + app/vendor/twig/twig/.github/workflows/ci.yml | 98 + .../twig/.github/workflows/documentation.yml | 60 + app/vendor/twig/twig/.gitignore | 1 + app/vendor/twig/twig/.php-cs-fixer.dist.php | 20 + app/vendor/twig/twig/.php_cs.dist | 16 - app/vendor/twig/twig/.travis.yml | 54 - app/vendor/twig/twig/CHANGELOG | 400 +- app/vendor/twig/twig/LICENSE | 44 +- app/vendor/twig/twig/README.rst | 12 + app/vendor/twig/twig/composer.json | 17 +- app/vendor/twig/twig/doc/.doctor-rst.yaml | 55 + .../twig/twig/doc/_build/.requirements.txt | 6 + app/vendor/twig/twig/doc/_build/Makefile | 153 + app/vendor/twig/twig/doc/_build/conf.py | 271 + app/vendor/twig/twig/doc/advanced.rst | 453 +- app/vendor/twig/twig/doc/advanced_legacy.rst | 885 --- app/vendor/twig/twig/doc/api.rst | 278 +- app/vendor/twig/twig/doc/coding_standards.rst | 22 +- app/vendor/twig/twig/doc/deprecated.rst | 108 +- app/vendor/twig/twig/doc/filters/abs.rst | 4 +- app/vendor/twig/twig/doc/filters/batch.rst | 13 +- .../twig/twig/doc/filters/capitalize.rst | 2 +- .../twig/doc/filters/convert_encoding.rst | 7 +- app/vendor/twig/twig/doc/filters/date.rst | 44 +- .../twig/twig/doc/filters/date_modify.rst | 9 +- app/vendor/twig/twig/doc/filters/default.rst | 13 +- app/vendor/twig/twig/doc/filters/escape.rst | 54 +- app/vendor/twig/twig/doc/filters/filter.rst | 59 + app/vendor/twig/twig/doc/filters/first.rst | 5 +- app/vendor/twig/twig/doc/filters/format.rst | 8 +- app/vendor/twig/twig/doc/filters/index.rst | 4 + app/vendor/twig/twig/doc/filters/join.rst | 17 +- .../twig/twig/doc/filters/json_encode.rst | 12 +- app/vendor/twig/twig/doc/filters/keys.rst | 2 +- app/vendor/twig/twig/doc/filters/last.rst | 5 +- app/vendor/twig/twig/doc/filters/length.rst | 4 +- app/vendor/twig/twig/doc/filters/lower.rst | 2 +- app/vendor/twig/twig/doc/filters/map.rst | 38 + app/vendor/twig/twig/doc/filters/merge.rst | 8 +- app/vendor/twig/twig/doc/filters/nl2br.rst | 3 +- .../twig/twig/doc/filters/number_format.rst | 17 +- app/vendor/twig/twig/doc/filters/raw.rst | 6 +- app/vendor/twig/twig/doc/filters/reduce.rst | 33 + app/vendor/twig/twig/doc/filters/replace.rst | 6 +- app/vendor/twig/twig/doc/filters/reverse.rst | 7 +- app/vendor/twig/twig/doc/filters/round.rst | 3 +- app/vendor/twig/twig/doc/filters/slice.rst | 15 +- app/vendor/twig/twig/doc/filters/sort.rst | 4 +- .../twig/twig/doc/filters/spaceless.rst | 65 + app/vendor/twig/twig/doc/filters/split.rst | 11 +- .../twig/twig/doc/filters/striptags.rst | 6 +- app/vendor/twig/twig/doc/filters/title.rst | 2 +- app/vendor/twig/twig/doc/filters/trim.rst | 10 +- app/vendor/twig/twig/doc/filters/upper.rst | 2 +- .../twig/twig/doc/filters/url_encode.rst | 10 +- .../twig/twig/doc/functions/attribute.rst | 5 +- app/vendor/twig/twig/doc/functions/block.rst | 16 +- .../twig/twig/doc/functions/constant.rst | 12 +- app/vendor/twig/twig/doc/functions/cycle.rst | 4 +- app/vendor/twig/twig/doc/functions/date.rst | 18 +- app/vendor/twig/twig/doc/functions/dump.rst | 19 +- .../twig/twig/doc/functions/include.rst | 21 +- app/vendor/twig/twig/doc/functions/max.rst | 5 +- app/vendor/twig/twig/doc/functions/min.rst | 5 +- app/vendor/twig/twig/doc/functions/parent.rst | 6 +- app/vendor/twig/twig/doc/functions/random.rst | 14 +- app/vendor/twig/twig/doc/functions/range.rst | 10 +- app/vendor/twig/twig/doc/functions/source.rst | 6 +- .../doc/functions/template_from_string.rst | 21 +- app/vendor/twig/twig/doc/installation.rst | 74 +- app/vendor/twig/twig/doc/internals.rst | 59 +- app/vendor/twig/twig/doc/intro.rst | 52 +- app/vendor/twig/twig/doc/recipes.rst | 186 +- app/vendor/twig/twig/doc/tags/apply.rst | 24 + app/vendor/twig/twig/doc/tags/autoescape.rst | 8 +- app/vendor/twig/twig/doc/tags/block.rst | 7 +- app/vendor/twig/twig/doc/tags/deprecated.rst | 31 + app/vendor/twig/twig/doc/tags/do.rst | 3 +- app/vendor/twig/twig/doc/tags/embed.rst | 15 +- app/vendor/twig/twig/doc/tags/extends.rst | 49 +- app/vendor/twig/twig/doc/tags/filter.rst | 13 +- app/vendor/twig/twig/doc/tags/flush.rst | 5 +- app/vendor/twig/twig/doc/tags/for.rst | 28 +- app/vendor/twig/twig/doc/tags/from.rst | 4 +- app/vendor/twig/twig/doc/tags/if.rst | 20 +- app/vendor/twig/twig/doc/tags/import.rst | 57 +- app/vendor/twig/twig/doc/tags/include.rst | 50 +- app/vendor/twig/twig/doc/tags/index.rst | 2 + app/vendor/twig/twig/doc/tags/macro.rst | 120 +- app/vendor/twig/twig/doc/tags/sandbox.rst | 4 +- app/vendor/twig/twig/doc/tags/set.rst | 16 +- app/vendor/twig/twig/doc/tags/spaceless.rst | 6 +- app/vendor/twig/twig/doc/tags/use.rst | 16 +- app/vendor/twig/twig/doc/tags/verbatim.rst | 3 +- app/vendor/twig/twig/doc/tags/with.rst | 7 +- app/vendor/twig/twig/doc/templates.rst | 353 +- app/vendor/twig/twig/doc/tests/constant.rst | 7 +- app/vendor/twig/twig/doc/tests/defined.rst | 4 +- .../twig/twig/doc/tests/divisibleby.rst | 3 +- app/vendor/twig/twig/doc/tests/empty.rst | 2 +- app/vendor/twig/twig/doc/tests/even.rst | 6 +- app/vendor/twig/twig/doc/tests/iterable.rst | 3 +- app/vendor/twig/twig/doc/tests/null.rst | 2 +- app/vendor/twig/twig/doc/tests/odd.rst | 6 +- app/vendor/twig/twig/doc/tests/sameas.rst | 5 +- app/vendor/twig/twig/ext/twig/.gitignore | 30 - app/vendor/twig/twig/ext/twig/config.m4 | 8 - app/vendor/twig/twig/ext/twig/config.w32 | 8 - app/vendor/twig/twig/ext/twig/php_twig.h | 35 - app/vendor/twig/twig/ext/twig/twig.c | 1217 --- app/vendor/twig/twig/lib/Twig/Autoloader.php | 14 +- .../twig/twig/lib/Twig/BaseNodeVisitor.php | 51 +- .../twig/twig/lib/Twig/Cache/Filesystem.php | 90 +- app/vendor/twig/twig/lib/Twig/Cache/Null.php | 37 +- .../twig/twig/lib/Twig/CacheInterface.php | 59 +- app/vendor/twig/twig/lib/Twig/Compiler.php | 283 +- .../twig/lib/Twig/ContainerRuntimeLoader.php | 36 +- app/vendor/twig/twig/lib/Twig/Environment.php | 1601 +--- app/vendor/twig/twig/lib/Twig/Error.php | 360 +- .../twig/twig/lib/Twig/Error/Loader.php | 39 +- .../twig/twig/lib/Twig/Error/Runtime.php | 25 +- .../twig/twig/lib/Twig/Error/Syntax.php | 52 +- .../twig/lib/Twig/ExistsLoaderInterface.php | 34 +- .../twig/twig/lib/Twig/ExpressionParser.php | 741 +- app/vendor/twig/twig/lib/Twig/Extension.php | 66 +- .../twig/twig/lib/Twig/Extension/Core.php | 1639 +--- .../twig/twig/lib/Twig/Extension/Debug.php | 64 +- .../twig/twig/lib/Twig/Extension/Escaper.php | 109 +- .../lib/Twig/Extension/GlobalsInterface.php | 27 +- .../Twig/Extension/InitRuntimeInterface.php | 27 +- .../twig/lib/Twig/Extension/Optimizer.php | 32 +- .../twig/twig/lib/Twig/Extension/Profiler.php | 46 +- .../twig/twig/lib/Twig/Extension/Sandbox.php | 100 +- .../twig/twig/lib/Twig/Extension/Staging.php | 109 +- .../twig/lib/Twig/Extension/StringLoader.php | 44 +- .../twig/twig/lib/Twig/ExtensionInterface.php | 91 +- .../twig/lib/Twig/FactoryRuntimeLoader.php | 36 +- .../Twig/FileExtensionEscapingStrategy.php | 59 +- app/vendor/twig/twig/lib/Twig/Filter.php | 18 +- .../twig/twig/lib/Twig/Filter/Function.php | 6 +- .../twig/twig/lib/Twig/Filter/Method.php | 12 +- app/vendor/twig/twig/lib/Twig/Filter/Node.php | 6 +- .../twig/lib/Twig/FilterCallableInterface.php | 2 +- .../twig/twig/lib/Twig/FilterInterface.php | 6 +- app/vendor/twig/twig/lib/Twig/Function.php | 20 +- .../twig/twig/lib/Twig/Function/Function.php | 6 +- .../twig/twig/lib/Twig/Function/Method.php | 12 +- .../twig/twig/lib/Twig/Function/Node.php | 6 +- .../lib/Twig/FunctionCallableInterface.php | 2 +- .../twig/twig/lib/Twig/FunctionInterface.php | 6 +- app/vendor/twig/twig/lib/Twig/Lexer.php | 424 +- .../twig/twig/lib/Twig/LexerInterface.php | 12 +- .../twig/twig/lib/Twig/Loader/Array.php | 94 +- .../twig/twig/lib/Twig/Loader/Chain.php | 148 +- .../twig/twig/lib/Twig/Loader/Filesystem.php | 287 +- .../twig/twig/lib/Twig/Loader/String.php | 13 +- .../twig/twig/lib/Twig/LoaderInterface.php | 58 +- app/vendor/twig/twig/lib/Twig/Markup.php | 36 +- app/vendor/twig/twig/lib/Twig/Node.php | 253 +- .../twig/twig/lib/Twig/Node/AutoEscape.php | 33 +- app/vendor/twig/twig/lib/Twig/Node/Block.php | 38 +- .../twig/lib/Twig/Node/BlockReference.php | 31 +- app/vendor/twig/twig/lib/Twig/Node/Body.php | 24 +- .../twig/twig/lib/Twig/Node/CheckSecurity.php | 77 +- .../twig/twig/lib/Twig/Node/Deprecated.php | 11 + app/vendor/twig/twig/lib/Twig/Node/Do.php | 32 +- app/vendor/twig/twig/lib/Twig/Node/Embed.php | 43 +- .../twig/twig/lib/Twig/Node/Expression.php | 25 +- .../twig/lib/Twig/Node/Expression/Array.php | 80 +- .../lib/Twig/Node/Expression/AssignName.php | 24 +- .../twig/lib/Twig/Node/Expression/Binary.php | 36 +- .../lib/Twig/Node/Expression/Binary/Add.php | 21 +- .../lib/Twig/Node/Expression/Binary/And.php | 21 +- .../Node/Expression/Binary/BitwiseAnd.php | 21 +- .../Twig/Node/Expression/Binary/BitwiseOr.php | 21 +- .../Node/Expression/Binary/BitwiseXor.php | 21 +- .../Twig/Node/Expression/Binary/Concat.php | 21 +- .../lib/Twig/Node/Expression/Binary/Div.php | 21 +- .../Twig/Node/Expression/Binary/EndsWith.php | 31 +- .../lib/Twig/Node/Expression/Binary/Equal.php | 20 +- .../Twig/Node/Expression/Binary/FloorDiv.php | 25 +- .../Twig/Node/Expression/Binary/Greater.php | 20 +- .../Node/Expression/Binary/GreaterEqual.php | 20 +- .../lib/Twig/Node/Expression/Binary/In.php | 29 +- .../lib/Twig/Node/Expression/Binary/Less.php | 20 +- .../Twig/Node/Expression/Binary/LessEqual.php | 20 +- .../Twig/Node/Expression/Binary/Matches.php | 29 +- .../lib/Twig/Node/Expression/Binary/Mod.php | 21 +- .../lib/Twig/Node/Expression/Binary/Mul.php | 21 +- .../Twig/Node/Expression/Binary/NotEqual.php | 20 +- .../lib/Twig/Node/Expression/Binary/NotIn.php | 29 +- .../lib/Twig/Node/Expression/Binary/Or.php | 21 +- .../lib/Twig/Node/Expression/Binary/Power.php | 31 +- .../lib/Twig/Node/Expression/Binary/Range.php | 29 +- .../Node/Expression/Binary/StartsWith.php | 31 +- .../lib/Twig/Node/Expression/Binary/Sub.php | 21 +- .../Twig/Node/Expression/BlockReference.php | 90 +- .../twig/lib/Twig/Node/Expression/Call.php | 288 +- .../lib/Twig/Node/Expression/Conditional.php | 32 +- .../lib/Twig/Node/Expression/Constant.php | 24 +- .../Node/Expression/ExtensionReference.php | 11 +- .../twig/lib/Twig/Node/Expression/Filter.php | 40 +- .../Twig/Node/Expression/Filter/Default.php | 42 +- .../lib/Twig/Node/Expression/Function.php | 44 +- .../twig/lib/Twig/Node/Expression/GetAttr.php | 71 +- .../lib/Twig/Node/Expression/MethodCall.php | 40 +- .../twig/lib/Twig/Node/Expression/Name.php | 104 +- .../lib/Twig/Node/Expression/NullCoalesce.php | 45 +- .../twig/lib/Twig/Node/Expression/Parent.php | 41 +- .../lib/Twig/Node/Expression/TempName.php | 27 +- .../twig/lib/Twig/Node/Expression/Test.php | 39 +- .../Twig/Node/Expression/Test/Constant.php | 47 +- .../lib/Twig/Node/Expression/Test/Defined.php | 58 +- .../Twig/Node/Expression/Test/Divisibleby.php | 34 +- .../lib/Twig/Node/Expression/Test/Even.php | 33 +- .../lib/Twig/Node/Expression/Test/Null.php | 32 +- .../lib/Twig/Node/Expression/Test/Odd.php | 33 +- .../lib/Twig/Node/Expression/Test/Sameas.php | 30 +- .../twig/lib/Twig/Node/Expression/Unary.php | 28 +- .../lib/Twig/Node/Expression/Unary/Neg.php | 21 +- .../lib/Twig/Node/Expression/Unary/Not.php | 21 +- .../lib/Twig/Node/Expression/Unary/Pos.php | 21 +- app/vendor/twig/twig/lib/Twig/Node/Flush.php | 30 +- app/vendor/twig/twig/lib/Twig/Node/For.php | 110 +- .../twig/twig/lib/Twig/Node/ForLoop.php | 49 +- app/vendor/twig/twig/lib/Twig/Node/If.php | 65 +- app/vendor/twig/twig/lib/Twig/Node/Import.php | 48 +- .../twig/twig/lib/Twig/Node/Include.php | 87 +- app/vendor/twig/twig/lib/Twig/Node/Macro.php | 122 +- app/vendor/twig/twig/lib/Twig/Node/Module.php | 458 +- app/vendor/twig/twig/lib/Twig/Node/Print.php | 33 +- .../twig/twig/lib/Twig/Node/Sandbox.php | 41 +- .../twig/lib/Twig/Node/SandboxedPrint.php | 48 +- app/vendor/twig/twig/lib/Twig/Node/Set.php | 95 +- .../twig/twig/lib/Twig/Node/SetTemp.php | 37 +- .../twig/twig/lib/Twig/Node/Spaceless.php | 34 +- app/vendor/twig/twig/lib/Twig/Node/Text.php | 33 +- app/vendor/twig/twig/lib/Twig/Node/With.php | 61 +- .../twig/lib/Twig/NodeCaptureInterface.php | 24 +- .../twig/twig/lib/Twig/NodeInterface.php | 6 +- .../twig/lib/Twig/NodeOutputInterface.php | 24 +- .../twig/twig/lib/Twig/NodeTraverser.php | 83 +- .../twig/lib/Twig/NodeVisitor/Escaper.php | 151 +- .../twig/lib/Twig/NodeVisitor/Optimizer.php | 250 +- .../lib/Twig/NodeVisitor/SafeAnalysis.php | 147 +- .../twig/lib/Twig/NodeVisitor/Sandbox.php | 79 +- .../twig/lib/Twig/NodeVisitorInterface.php | 46 +- app/vendor/twig/twig/lib/Twig/Parser.php | 409 +- .../twig/twig/lib/Twig/ParserInterface.php | 10 +- .../twig/lib/Twig/Profiler/Dumper/Base.php | 59 +- .../lib/Twig/Profiler/Dumper/Blackfire.php | 69 +- .../twig/lib/Twig/Profiler/Dumper/Html.php | 44 +- .../twig/lib/Twig/Profiler/Dumper/Text.php | 32 +- .../lib/Twig/Profiler/Node/EnterProfile.php | 36 +- .../lib/Twig/Profiler/Node/LeaveProfile.php | 30 +- .../Twig/Profiler/NodeVisitor/Profiler.php | 64 +- .../twig/twig/lib/Twig/Profiler/Profile.php | 167 +- .../twig/lib/Twig/RuntimeLoaderInterface.php | 32 +- .../twig/lib/Twig/Sandbox/SecurityError.php | 24 +- .../Sandbox/SecurityNotAllowedFilterError.php | 30 +- .../SecurityNotAllowedFunctionError.php | 30 +- .../Sandbox/SecurityNotAllowedMethodError.php | 37 +- .../SecurityNotAllowedPropertyError.php | 37 +- .../Sandbox/SecurityNotAllowedTagError.php | 30 +- .../twig/lib/Twig/Sandbox/SecurityPolicy.php | 122 +- .../Twig/Sandbox/SecurityPolicyInterface.php | 27 +- .../twig/twig/lib/Twig/SimpleFilter.php | 118 +- .../twig/twig/lib/Twig/SimpleFunction.php | 108 +- app/vendor/twig/twig/lib/Twig/SimpleTest.php | 70 +- app/vendor/twig/twig/lib/Twig/Source.php | 50 +- .../lib/Twig/SourceContextLoaderInterface.php | 36 +- app/vendor/twig/twig/lib/Twig/Template.php | 705 +- .../twig/twig/lib/Twig/TemplateInterface.php | 12 +- .../twig/twig/lib/Twig/TemplateWrapper.php | 130 +- app/vendor/twig/twig/lib/Twig/Test.php | 10 +- .../twig/twig/lib/Twig/Test/Function.php | 4 +- .../lib/Twig/Test/IntegrationTestCase.php | 246 +- app/vendor/twig/twig/lib/Twig/Test/Method.php | 15 +- app/vendor/twig/twig/lib/Twig/Test/Node.php | 4 +- .../twig/twig/lib/Twig/Test/NodeTestCase.php | 72 +- app/vendor/twig/twig/lib/Twig/Token.php | 204 +- app/vendor/twig/twig/lib/Twig/TokenParser.php | 30 +- .../twig/lib/Twig/TokenParser/AutoEscape.php | 80 +- .../twig/twig/lib/Twig/TokenParser/Block.php | 70 +- .../twig/lib/Twig/TokenParser/Deprecated.php | 11 + .../twig/twig/lib/Twig/TokenParser/Do.php | 31 +- .../twig/twig/lib/Twig/TokenParser/Embed.php | 64 +- .../twig/lib/Twig/TokenParser/Extends.php | 43 +- .../twig/twig/lib/Twig/TokenParser/Filter.php | 50 +- .../twig/twig/lib/Twig/TokenParser/Flush.php | 31 +- .../twig/twig/lib/Twig/TokenParser/For.php | 124 +- .../twig/twig/lib/Twig/TokenParser/From.php | 63 +- .../twig/twig/lib/Twig/TokenParser/If.php | 83 +- .../twig/twig/lib/Twig/TokenParser/Import.php | 38 +- .../twig/lib/Twig/TokenParser/Include.php | 62 +- .../twig/twig/lib/Twig/TokenParser/Macro.php | 57 +- .../twig/lib/Twig/TokenParser/Sandbox.php | 58 +- .../twig/twig/lib/Twig/TokenParser/Set.php | 72 +- .../twig/lib/Twig/TokenParser/Spaceless.php | 48 +- .../twig/twig/lib/Twig/TokenParser/Use.php | 67 +- .../twig/twig/lib/Twig/TokenParser/With.php | 49 +- .../twig/twig/lib/Twig/TokenParserBroker.php | 28 +- .../lib/Twig/TokenParserBrokerInterface.php | 8 +- .../twig/lib/Twig/TokenParserInterface.php | 44 +- app/vendor/twig/twig/lib/Twig/TokenStream.php | 193 +- .../lib/Twig/Util/DeprecationCollector.php | 83 +- .../lib/Twig/Util/TemplateDirIterator.php | 25 +- app/vendor/twig/twig/phpunit.xml.dist | 33 - .../twig/twig/src/Cache/CacheInterface.php | 59 +- .../twig/twig/src/Cache/FilesystemCache.php | 88 +- app/vendor/twig/twig/src/Cache/NullCache.php | 37 +- app/vendor/twig/twig/src/Compiler.php | 283 +- app/vendor/twig/twig/src/Environment.php | 1633 +++- app/vendor/twig/twig/src/Error/Error.php | 320 +- .../twig/twig/src/Error/LoaderError.php | 24 +- .../twig/twig/src/Error/RuntimeError.php | 25 +- .../twig/twig/src/Error/SyntaxError.php | 52 +- app/vendor/twig/twig/src/ExpressionParser.php | 845 +- .../twig/src/Extension/AbstractExtension.php | 67 +- .../twig/twig/src/Extension/CoreExtension.php | 1761 ++++- .../twig/src/Extension/DebugExtension.php | 73 +- .../twig/src/Extension/EscaperExtension.php | 117 +- .../twig/src/Extension/ExtensionInterface.php | 100 +- .../twig/src/Extension/GlobalsInterface.php | 27 +- .../src/Extension/InitRuntimeInterface.php | 27 +- .../twig/src/Extension/OptimizerExtension.php | 34 +- .../twig/src/Extension/ProfilerExtension.php | 48 +- .../twig/src/Extension/SandboxExtension.php | 104 +- .../twig/src/Extension/StagingExtension.php | 112 +- .../src/Extension/StringLoaderExtension.php | 51 +- .../src/FileExtensionEscapingStrategy.php | 59 +- app/vendor/twig/twig/src/Lexer.php | 533 +- .../twig/twig/src/Loader/ArrayLoader.php | 97 +- .../twig/twig/src/Loader/ChainLoader.php | 159 +- .../twig/src/Loader/ExistsLoaderInterface.php | 34 +- .../twig/twig/src/Loader/FilesystemLoader.php | 318 +- .../twig/twig/src/Loader/LoaderInterface.php | 60 +- .../Loader/SourceContextLoaderInterface.php | 37 +- app/vendor/twig/twig/src/Markup.php | 39 +- .../twig/twig/src/Node/AutoEscapeNode.php | 35 +- app/vendor/twig/twig/src/Node/BlockNode.php | 40 +- .../twig/twig/src/Node/BlockReferenceNode.php | 33 +- app/vendor/twig/twig/src/Node/BodyNode.php | 24 +- .../twig/src/Node/CheckSecurityCallNode.php | 28 + .../twig/twig/src/Node/CheckSecurityNode.php | 85 +- .../twig/twig/src/Node/CheckToStringNode.php | 42 + .../twig/twig/src/Node/DeprecatedNode.php | 55 + app/vendor/twig/twig/src/Node/DoNode.php | 35 +- app/vendor/twig/twig/src/Node/EmbedNode.php | 47 +- .../Node/Expression/AbstractExpression.php | 25 +- .../src/Node/Expression/ArrayExpression.php | 83 +- .../Expression/ArrowFunctionExpression.php | 64 + .../Node/Expression/AssignNameExpression.php | 24 +- .../Node/Expression/Binary/AbstractBinary.php | 38 +- .../src/Node/Expression/Binary/AddBinary.php | 20 +- .../src/Node/Expression/Binary/AndBinary.php | 20 +- .../Expression/Binary/BitwiseAndBinary.php | 20 +- .../Expression/Binary/BitwiseOrBinary.php | 20 +- .../Expression/Binary/BitwiseXorBinary.php | 20 +- .../Node/Expression/Binary/ConcatBinary.php | 20 +- .../src/Node/Expression/Binary/DivBinary.php | 20 +- .../Node/Expression/Binary/EndsWithBinary.php | 32 +- .../Node/Expression/Binary/EqualBinary.php | 19 +- .../Node/Expression/Binary/FloorDivBinary.php | 26 +- .../Node/Expression/Binary/GreaterBinary.php | 19 +- .../Expression/Binary/GreaterEqualBinary.php | 19 +- .../src/Node/Expression/Binary/InBinary.php | 30 +- .../src/Node/Expression/Binary/LessBinary.php | 19 +- .../Expression/Binary/LessEqualBinary.php | 19 +- .../Node/Expression/Binary/MatchesBinary.php | 30 +- .../src/Node/Expression/Binary/ModBinary.php | 20 +- .../src/Node/Expression/Binary/MulBinary.php | 20 +- .../Node/Expression/Binary/NotEqualBinary.php | 19 +- .../Node/Expression/Binary/NotInBinary.php | 30 +- .../src/Node/Expression/Binary/OrBinary.php | 20 +- .../Node/Expression/Binary/PowerBinary.php | 34 +- .../Node/Expression/Binary/RangeBinary.php | 30 +- .../Expression/Binary/StartsWithBinary.php | 32 +- .../src/Node/Expression/Binary/SubBinary.php | 20 +- .../Expression/BlockReferenceExpression.php | 93 +- .../src/Node/Expression/CallExpression.php | 310 +- .../Node/Expression/ConditionalExpression.php | 33 +- .../Node/Expression/ConstantExpression.php | 25 +- .../Node/Expression/Filter/DefaultFilter.php | 49 +- .../src/Node/Expression/FilterExpression.php | 42 +- .../Node/Expression/FunctionExpression.php | 46 +- .../src/Node/Expression/GetAttrExpression.php | 75 +- .../twig/src/Node/Expression/InlinePrint.php | 35 + .../Node/Expression/MethodCallExpression.php | 43 +- .../src/Node/Expression/NameExpression.php | 114 +- .../Expression/NullCoalesceExpression.php | 57 +- .../src/Node/Expression/ParentExpression.php | 43 +- .../Node/Expression/TempNameExpression.php | 28 +- .../src/Node/Expression/Test/ConstantTest.php | 46 +- .../src/Node/Expression/Test/DefinedTest.php | 66 +- .../Node/Expression/Test/DivisiblebyTest.php | 33 +- .../src/Node/Expression/Test/EvenTest.php | 32 +- .../src/Node/Expression/Test/NullTest.php | 31 +- .../twig/src/Node/Expression/Test/OddTest.php | 32 +- .../src/Node/Expression/Test/SameasTest.php | 31 +- .../src/Node/Expression/TestExpression.php | 46 +- .../Node/Expression/Unary/AbstractUnary.php | 30 +- .../src/Node/Expression/Unary/NegUnary.php | 20 +- .../src/Node/Expression/Unary/NotUnary.php | 20 +- .../src/Node/Expression/Unary/PosUnary.php | 20 +- app/vendor/twig/twig/src/Node/FlushNode.php | 32 +- app/vendor/twig/twig/src/Node/ForLoopNode.php | 51 +- app/vendor/twig/twig/src/Node/ForNode.php | 114 +- app/vendor/twig/twig/src/Node/IfNode.php | 67 +- app/vendor/twig/twig/src/Node/ImportNode.php | 52 +- app/vendor/twig/twig/src/Node/IncludeNode.php | 103 +- app/vendor/twig/twig/src/Node/MacroNode.php | 131 +- app/vendor/twig/twig/src/Node/ModuleNode.php | 487 +- app/vendor/twig/twig/src/Node/Node.php | 275 +- .../twig/src/Node/NodeCaptureInterface.php | 24 +- .../twig/src/Node/NodeOutputInterface.php | 24 +- app/vendor/twig/twig/src/Node/PrintNode.php | 36 +- app/vendor/twig/twig/src/Node/SandboxNode.php | 49 +- .../twig/twig/src/Node/SandboxedPrintNode.php | 64 +- app/vendor/twig/twig/src/Node/SetNode.php | 102 +- app/vendor/twig/twig/src/Node/SetTempNode.php | 39 +- .../twig/twig/src/Node/SpacelessNode.php | 42 +- app/vendor/twig/twig/src/Node/TextNode.php | 35 +- app/vendor/twig/twig/src/Node/WithNode.php | 67 +- app/vendor/twig/twig/src/NodeTraverser.php | 84 +- .../src/NodeVisitor/AbstractNodeVisitor.php | 54 +- .../src/NodeVisitor/EscaperNodeVisitor.php | 204 +- .../src/NodeVisitor/NodeVisitorInterface.php | 49 +- .../src/NodeVisitor/OptimizerNodeVisitor.php | 268 +- .../NodeVisitor/SafeAnalysisNodeVisitor.php | 159 +- .../src/NodeVisitor/SandboxNodeVisitor.php | 134 +- app/vendor/twig/twig/src/Parser.php | 434 +- .../twig/src/Profiler/Dumper/BaseDumper.php | 60 +- .../src/Profiler/Dumper/BlackfireDumper.php | 71 +- .../twig/src/Profiler/Dumper/HtmlDumper.php | 46 +- .../twig/src/Profiler/Dumper/TextDumper.php | 34 +- .../src/Profiler/Node/EnterProfileNode.php | 39 +- .../src/Profiler/Node/LeaveProfileNode.php | 33 +- .../NodeVisitor/ProfilerNodeVisitor.php | 75 +- app/vendor/twig/twig/src/Profiler/Profile.php | 183 +- .../RuntimeLoader/ContainerRuntimeLoader.php | 36 +- .../RuntimeLoader/FactoryRuntimeLoader.php | 36 +- .../RuntimeLoader/RuntimeLoaderInterface.php | 32 +- .../twig/twig/src/Sandbox/SecurityError.php | 24 +- .../Sandbox/SecurityNotAllowedFilterError.php | 30 +- .../SecurityNotAllowedFunctionError.php | 30 +- .../Sandbox/SecurityNotAllowedMethodError.php | 37 +- .../SecurityNotAllowedPropertyError.php | 37 +- .../Sandbox/SecurityNotAllowedTagError.php | 30 +- .../twig/twig/src/Sandbox/SecurityPolicy.php | 124 +- .../src/Sandbox/SecurityPolicyInterface.php | 27 +- app/vendor/twig/twig/src/Source.php | 50 +- app/vendor/twig/twig/src/Template.php | 726 +- app/vendor/twig/twig/src/TemplateWrapper.php | 156 +- .../twig/src/Test/IntegrationTestCase.php | 252 +- .../twig/twig/src/Test/NodeTestCase.php | 74 +- app/vendor/twig/twig/src/Token.php | 210 +- .../src/TokenParser/AbstractTokenParser.php | 29 +- .../twig/src/TokenParser/ApplyTokenParser.php | 58 + .../src/TokenParser/AutoEscapeTokenParser.php | 83 +- .../twig/src/TokenParser/BlockTokenParser.php | 75 +- .../src/TokenParser/DeprecatedTokenParser.php | 44 + .../twig/src/TokenParser/DoTokenParser.php | 34 +- .../twig/src/TokenParser/EmbedTokenParser.php | 69 +- .../src/TokenParser/ExtendsTokenParser.php | 49 +- .../src/TokenParser/FilterTokenParser.php | 54 +- .../twig/src/TokenParser/FlushTokenParser.php | 34 +- .../twig/src/TokenParser/ForTokenParser.php | 131 +- .../twig/src/TokenParser/FromTokenParser.php | 67 +- .../twig/src/TokenParser/IfTokenParser.php | 86 +- .../src/TokenParser/ImportTokenParser.php | 40 +- .../src/TokenParser/IncludeTokenParser.php | 63 +- .../twig/src/TokenParser/MacroTokenParser.php | 63 +- .../src/TokenParser/SandboxTokenParser.php | 62 +- .../twig/src/TokenParser/SetTokenParser.php | 69 +- .../src/TokenParser/SpacelessTokenParser.php | 48 +- .../src/TokenParser/TokenParserInterface.php | 50 +- .../twig/src/TokenParser/UseTokenParser.php | 70 +- .../twig/src/TokenParser/WithTokenParser.php | 52 +- app/vendor/twig/twig/src/TokenStream.php | 196 +- app/vendor/twig/twig/src/TwigFilter.php | 123 +- app/vendor/twig/twig/src/TwigFunction.php | 113 +- app/vendor/twig/twig/src/TwigTest.php | 88 +- .../twig/src/Util/DeprecationCollector.php | 87 +- .../twig/src/Util/TemplateDirIterator.php | 25 +- .../twig/test/Twig/Tests/AutoloaderTest.php | 24 - .../test/Twig/Tests/Cache/FilesystemTest.php | 193 - .../twig/test/Twig/Tests/CompilerTest.php | 33 - .../Twig/Tests/ContainerRuntimeLoaderTest.php | 40 - .../test/Twig/Tests/CustomExtensionTest.php | 93 - .../twig/test/Twig/Tests/EnvironmentTest.php | 686 -- .../twig/twig/test/Twig/Tests/ErrorTest.php | 211 - .../test/Twig/Tests/ExpressionParserTest.php | 377 - .../test/Twig/Tests/Extension/CoreTest.php | 355 - .../test/Twig/Tests/Extension/SandboxTest.php | 323 - .../Twig/Tests/FactoryRuntimeLoaderTest.php | 32 - .../twig/test/Twig/Tests/FileCachingTest.php | 63 - .../FileExtensionEscapingStrategyTest.php | 51 - .../twig/test/Twig/Tests/FilesystemHelper.php | 30 - .../Twig/Tests/Fixtures/autoescape/block.test | 21 - .../Twig/Tests/Fixtures/autoescape/name.test | 22 - .../test/Twig/Tests/Fixtures/errors/base.html | 1 - .../Twig/Tests/Fixtures/errors/index.html | 7 - .../child_contents_outside_blocks.test | 15 - ...ltiline_array_with_undefined_variable.test | 18 - ...e_array_with_undefined_variable_again.test | 18 - ...line_function_with_undefined_variable.test | 12 - ...tiline_function_with_unknown_argument.test | 9 - ...multiline_tag_with_undefined_variable.test | 12 - .../strict_comparison_operator.test | 6 - .../syntax_error_in_reused_template.test | 10 - .../Fixtures/exceptions/unclosed_tag.test | 20 - .../Fixtures/exceptions/undefined_parent.test | 8 - .../undefined_template_in_child_template.test | 15 - .../Fixtures/exceptions/undefined_trait.test | 9 - .../Tests/Fixtures/expressions/_self.test | 8 - .../Tests/Fixtures/expressions/array.test | 61 - .../Fixtures/expressions/array_call.test | 14 - .../Tests/Fixtures/expressions/binary.test | 46 - .../Tests/Fixtures/expressions/bitwise.test | 14 - .../Fixtures/expressions/comparison.test | 14 - .../Fixtures/expressions/divisibleby.test | 17 - .../Tests/Fixtures/expressions/dotdot.test | 20 - .../Tests/Fixtures/expressions/ends_with.test | 26 - .../Tests/Fixtures/expressions/grouping.test | 8 - .../Tests/Fixtures/expressions/literals.test | 22 - .../Fixtures/expressions/magic_call.test | 27 - .../Tests/Fixtures/expressions/matches.test | 12 - .../Fixtures/expressions/method_call.test | 28 - .../expressions/negative_numbers.test | 18 - .../expressions/operators_as_variables.test | 16 - .../Tests/Fixtures/expressions/postfix.test | 22 - .../Tests/Fixtures/expressions/power.test | 20 - .../Tests/Fixtures/expressions/sameas.test | 21 - .../Fixtures/expressions/starts_with.test | 27 - .../Tests/Fixtures/expressions/strings.test | 10 - .../expressions/ternary_operator.test | 18 - .../expressions/ternary_operator_noelse.test | 10 - .../expressions/ternary_operator_nothen.test | 10 - .../two_word_operators_as_variables.test | 8 - .../Tests/Fixtures/expressions/unary.test | 12 - .../expressions/unary_macro_arguments.test | 22 - .../expressions/unary_precedence.test | 14 - .../test/Twig/Tests/Fixtures/filters/abs.test | 30 - .../Twig/Tests/Fixtures/filters/batch.test | 31 - .../Tests/Fixtures/filters/batch_float.test | 29 - .../filters/batch_with_empty_fill.test | 37 - .../filters/batch_with_exact_elements.test | 33 - .../Fixtures/filters/batch_with_fill.test | 37 - .../Fixtures/filters/batch_with_keys.test | 10 - .../filters/batch_with_zero_elements.test | 10 - .../Fixtures/filters/convert_encoding.test | 10 - .../Twig/Tests/Fixtures/filters/date.test | 90 - .../Fixtures/filters/date_default_format.test | 14 - .../filters/date_default_format_interval.test | 16 - .../Fixtures/filters/date_immutable.test | 37 - .../Tests/Fixtures/filters/date_interval.test | 19 - .../Tests/Fixtures/filters/date_modify.test | 14 - .../Fixtures/filters/date_namedargs.test | 13 - .../Twig/Tests/Fixtures/filters/default.test | 150 - .../Fixtures/filters/dynamic_filter.test | 10 - .../Twig/Tests/Fixtures/filters/escape.test | 8 - .../Fixtures/filters/escape_html_attr.test | 8 - .../Fixtures/filters/escape_javascript.test | 8 - .../filters/escape_non_supported_charset.test | 8 - .../Twig/Tests/Fixtures/filters/first.test | 17 - .../Tests/Fixtures/filters/force_escape.test | 18 - .../Twig/Tests/Fixtures/filters/format.test | 8 - .../Twig/Tests/Fixtures/filters/join.test | 12 - .../Tests/Fixtures/filters/json_encode.test | 12 - .../Twig/Tests/Fixtures/filters/last.test | 17 - .../Twig/Tests/Fixtures/filters/length.test | 37 - .../Tests/Fixtures/filters/length_utf8.test | 12 - .../Twig/Tests/Fixtures/filters/merge.test | 18 - .../Twig/Tests/Fixtures/filters/nl2br.test | 14 - .../Tests/Fixtures/filters/number_format.test | 18 - .../filters/number_format_default.test | 21 - .../Twig/Tests/Fixtures/filters/replace.test | 12 - .../Fixtures/filters/replace_invalid_arg.test | 8 - .../Twig/Tests/Fixtures/filters/reverse.test | 18 - .../Twig/Tests/Fixtures/filters/round.test | 22 - .../Twig/Tests/Fixtures/filters/slice.test | 54 - .../Twig/Tests/Fixtures/filters/sort.test | 12 - .../Tests/Fixtures/filters/special_chars.test | 8 - .../Twig/Tests/Fixtures/filters/split.test | 20 - .../Tests/Fixtures/filters/split_utf8.test | 24 - .../Tests/Fixtures/filters/static_calls.test | 10 - .../Twig/Tests/Fixtures/filters/trim.test | 24 - .../Tests/Fixtures/filters/urlencode.test | 16 - .../filters/urlencode_deprecated.test | 16 - .../Tests/Fixtures/functions/attribute.test | 18 - .../Twig/Tests/Fixtures/functions/block.test | 12 - .../functions/block_with_template.test | 22 - .../functions/block_without_name.test | 12 - .../Tests/Fixtures/functions/constant.test | 10 - .../Twig/Tests/Fixtures/functions/cycle.test | 16 - .../Twig/Tests/Fixtures/functions/date.test | 27 - .../Fixtures/functions/date_namedargs.test | 11 - .../Twig/Tests/Fixtures/functions/dump.test | 16 - .../Tests/Fixtures/functions/dump_array.test | 19 - .../Fixtures/functions/dynamic_function.test | 10 - .../functions/include/assignment.test | 13 - .../functions/include/autoescaping.test | 10 - .../Fixtures/functions/include/basic.test | 17 - .../functions/include/expression.test | 17 - .../functions/include/ignore_missing.test | 10 - .../Fixtures/functions/include/missing.test | 8 - .../functions/include/missing_nested.test | 16 - .../Fixtures/functions/include/sandbox.test | 13 - .../functions/include/sandbox_disabling.test | 16 - .../sandbox_disabling_ignore_missing.test | 13 - .../functions/include/template_instance.test | 10 - .../functions/include/templates_as_array.test | 12 - .../functions/include/with_context.test | 16 - .../functions/include/with_variables.test | 12 - .../Tests/Fixtures/functions/magic_call.test | 8 - .../Fixtures/functions/magic_call53.test | 12 - .../Twig/Tests/Fixtures/functions/max.test | 12 - .../Twig/Tests/Fixtures/functions/min.test | 12 - .../Twig/Tests/Fixtures/functions/range.test | 8 - .../recursive_block_with_inheritance.test | 21 - .../Twig/Tests/Fixtures/functions/source.test | 17 - .../Fixtures/functions/special_chars.test | 8 - .../Fixtures/functions/static_calls.test | 10 - .../functions/template_from_string.test | 15 - .../Tests/Fixtures/macros/default_values.test | 16 - .../Tests/Fixtures/macros/nested_calls.test | 18 - .../Fixtures/macros/reserved_variables.test | 14 - .../Twig/Tests/Fixtures/macros/simple.test | 22 - .../Twig/Tests/Fixtures/macros/varargs.test | 21 - .../Fixtures/macros/varargs_argument.test | 7 - .../Tests/Fixtures/macros/with_filters.test | 14 - .../regression/block_names_unicity.test | 19 - .../regression/combined_debug_info.test | 15 - .../Fixtures/regression/empty_token.test | 8 - .../Tests/Fixtures/regression/issue_1143.test | 23 - .../Fixtures/regression/multi_word_tests.test | 10 - .../regression/simple_xml_element.test | 19 - .../regression/strings_like_numbers.test | 8 - .../Tests/Fixtures/tags/autoescape/basic.test | 26 - .../Fixtures/tags/autoescape/blocks.test | 12 - .../tags/autoescape/double_escaping.test | 10 - .../Fixtures/tags/autoescape/functions.test | 83 - .../Fixtures/tags/autoescape/literal.test | 45 - .../Fixtures/tags/autoescape/nested.test | 26 - .../Fixtures/tags/autoescape/objects.test | 26 - .../Tests/Fixtures/tags/autoescape/raw.test | 10 - .../tags/autoescape/strategy.legacy.test | 11 - .../Fixtures/tags/autoescape/strategy.test | 11 - .../Tests/Fixtures/tags/autoescape/type.test | 69 - .../tags/autoescape/with_filters.test | 131 - .../autoescape/with_filters_arguments.test | 23 - .../autoescape/with_pre_escape_filters.test | 68 - .../with_preserves_safety_filters.test | 50 - .../Twig/Tests/Fixtures/tags/block/basic.test | 11 - .../tags/block/block_unique_name.test | 11 - .../Fixtures/tags/block/special_chars.test | 10 - .../Twig/Tests/Fixtures/tags/embed/basic.test | 35 - .../tags/embed/complex_dynamic_parent.test | 35 - .../Fixtures/tags/embed/dynamic_parent.test | 35 - .../Tests/Fixtures/tags/embed/error_line.test | 16 - .../Tests/Fixtures/tags/embed/multiple.test | 50 - .../Tests/Fixtures/tags/embed/nested.test | 42 - .../Fixtures/tags/embed/with_extends.test | 60 - .../Tests/Fixtures/tags/filter/basic.test | 10 - .../Fixtures/tags/filter/json_encode.test | 8 - .../Tests/Fixtures/tags/filter/multiple.test | 10 - .../Tests/Fixtures/tags/filter/nested.test | 16 - .../Fixtures/tags/filter/with_for_tag.test | 13 - .../Fixtures/tags/filter/with_if_tag.test | 29 - .../Tests/Fixtures/tags/for/condition.test | 14 - .../Twig/Tests/Fixtures/tags/for/context.test | 18 - .../Twig/Tests/Fixtures/tags/for/else.test | 23 - .../Fixtures/tags/for/inner_variables.test | 17 - .../Twig/Tests/Fixtures/tags/for/keys.test | 11 - .../Fixtures/tags/for/keys_and_values.test | 11 - .../Tests/Fixtures/tags/for/loop_context.test | 19 - .../Fixtures/tags/for/loop_context_local.test | 10 - .../Fixtures/tags/for/loop_not_defined.test | 10 - .../tags/for/loop_not_defined_cond.test | 9 - .../Tests/Fixtures/tags/for/nested_else.test | 17 - .../Twig/Tests/Fixtures/tags/for/objects.test | 43 - .../Fixtures/tags/for/objects_countable.test | 47 - .../Tests/Fixtures/tags/for/recursive.test | 18 - .../Twig/Tests/Fixtures/tags/for/values.test | 11 - .../test/Twig/Tests/Fixtures/tags/from.test | 14 - .../Twig/Tests/Fixtures/tags/if/basic.test | 22 - .../Tests/Fixtures/tags/if/expression.test | 22 - .../Tests/Fixtures/tags/include/basic.test | 16 - .../Fixtures/tags/include/expression.test | 16 - .../Fixtures/tags/include/ignore_missing.test | 10 - .../Tests/Fixtures/tags/include/missing.test | 8 - .../Fixtures/tags/include/missing_nested.test | 16 - .../Tests/Fixtures/tags/include/only.test | 16 - .../tags/include/template_instance.test | 10 - .../tags/include/templates_as_array.test | 12 - .../Fixtures/tags/include/with_variables.test | 12 - .../Fixtures/tags/inheritance/basic.test | 14 - .../Fixtures/tags/inheritance/block_expr.test | 32 - .../tags/inheritance/block_expr2.test | 34 - .../tags/inheritance/conditional.test | 14 - .../Fixtures/tags/inheritance/dynamic.test | 14 - .../Fixtures/tags/inheritance/empty.test | 10 - .../tags/inheritance/extends_as_array.test | 12 - .../extends_as_array_with_empty_name.test | 12 - .../extends_as_array_with_null_name.test | 12 - .../Fixtures/tags/inheritance/multiple.test | 12 - .../tags/inheritance/multiple_dynamic.test | 22 - .../tags/inheritance/nested_blocks.test | 22 - .../nested_blocks_parent_only.test | 15 - .../tags/inheritance/nested_inheritance.test | 16 - .../Fixtures/tags/inheritance/parent.test | 12 - .../tags/inheritance/parent_change.test | 16 - .../tags/inheritance/parent_in_a_block.test | 8 - .../tags/inheritance/parent_isolation.test | 20 - .../tags/inheritance/parent_nested.test | 28 - .../inheritance/parent_without_extends.test | 8 - .../parent_without_extends_but_traits.test | 14 - .../tags/inheritance/template_instance.test | 14 - .../Tests/Fixtures/tags/inheritance/use.test | 44 - .../Twig/Tests/Fixtures/tags/macro/basic.test | 17 - .../Fixtures/tags/macro/endmacro_name.test | 16 - .../Tests/Fixtures/tags/macro/external.test | 17 - .../Twig/Tests/Fixtures/tags/macro/from.test | 18 - .../tags/macro/from_with_reserved_name.test | 9 - .../Tests/Fixtures/tags/macro/global.test | 14 - .../tags/macro/import_with_reserved_nam.test | 11 - .../Fixtures/tags/macro/reserved_name.test | 10 - .../Fixtures/tags/macro/self_import.test | 17 - .../Fixtures/tags/macro/special_chars.test | 14 - .../Fixtures/tags/macro/super_globals.test | 14 - .../Tests/Fixtures/tags/raw/basic.legacy.test | 10 - .../tags/raw/mixed_usage_with_raw.legacy.test | 10 - .../tags/raw/whitespace_control.legacy.test | 56 - .../Fixtures/tags/sandbox/not_valid1.test | 11 - .../Fixtures/tags/sandbox/not_valid2.test | 14 - .../Tests/Fixtures/tags/sandbox/simple.test | 22 - .../Twig/Tests/Fixtures/tags/set/basic.test | 20 - .../Fixtures/tags/set/capture-empty.test | 9 - .../Twig/Tests/Fixtures/tags/set/capture.test | 10 - .../Tests/Fixtures/tags/set/expression.test | 12 - .../Tests/Fixtures/tags/spaceless/simple.test | 12 - .../Tests/Fixtures/tags/special_chars.test | 8 - .../Twig/Tests/Fixtures/tags/trim_block.test | 74 - .../Twig/Tests/Fixtures/tags/use/aliases.test | 12 - .../Twig/Tests/Fixtures/tags/use/basic.test | 12 - .../Twig/Tests/Fixtures/tags/use/deep.test | 22 - .../Tests/Fixtures/tags/use/deep_empty.test | 10 - .../Tests/Fixtures/tags/use/inheritance.test | 25 - .../Tests/Fixtures/tags/use/inheritance2.test | 24 - .../Tests/Fixtures/tags/use/multiple.test | 21 - .../Fixtures/tags/use/multiple_aliases.test | 23 - .../Tests/Fixtures/tags/use/parent_block.test | 24 - .../Fixtures/tags/use/parent_block2.test | 24 - .../Fixtures/tags/use/parent_block3.test | 38 - .../Fixtures/tags/use/use_with_parent.test | 24 - .../Tests/Fixtures/tags/verbatim/basic.test | 10 - .../tags/verbatim/mixed_usage_with_raw.test | 10 - .../tags/verbatim/whitespace_control.test | 56 - .../Twig/Tests/Fixtures/tags/with/basic.test | 13 - .../Tests/Fixtures/tags/with/expression.test | 10 - .../Twig/Tests/Fixtures/tags/with/nested.test | 15 - .../Fixtures/tags/with/with_no_hash.test | 10 - .../Tests/Fixtures/tags/with/with_only.test | 10 - .../test/Twig/Tests/Fixtures/tests/array.test | 24 - .../Twig/Tests/Fixtures/tests/constant.test | 14 - .../Twig/Tests/Fixtures/tests/defined.test | 129 - .../Fixtures/tests/defined_for_attribute.test | 35 - .../Fixtures/tests/defined_for_blocks.test | 38 - .../defined_for_blocks_with_template.test | 17 - .../Fixtures/tests/defined_for_constants.test | 14 - .../test/Twig/Tests/Fixtures/tests/empty.test | 42 - .../test/Twig/Tests/Fixtures/tests/even.test | 14 - .../test/Twig/Tests/Fixtures/tests/in.test | 128 - .../Tests/Fixtures/tests/in_with_objects.test | 19 - .../Twig/Tests/Fixtures/tests/iterable.test | 19 - .../Tests/Fixtures/tests/null_coalesce.test | 30 - .../test/Twig/Tests/Fixtures/tests/odd.test | 10 - .../twig/test/Twig/Tests/IntegrationTest.php | 327 - .../autoescape/filename.legacy.test | 18 - .../functions/undefined_block.legacy.test | 12 - .../Tests/LegacyFixtures/test.legacy.test | 8 - .../test/Twig/Tests/LegacyIntegrationTest.php | 54 - .../twig/twig/test/Twig/Tests/LexerTest.php | 347 - .../twig/test/Twig/Tests/Loader/ArrayTest.php | 137 - .../twig/test/Twig/Tests/Loader/ChainTest.php | 124 - .../test/Twig/Tests/Loader/FilesystemTest.php | 226 - .../array_inheritance_empty_parent.html.twig | 3 - ...y_inheritance_nonexistent_parent.html.twig | 3 - .../array_inheritance_null_parent.html.twig | 3 - .../array_inheritance_valid_parent.html.twig | 3 - .../Fixtures/inheritance/parent.html.twig | 1 - .../inheritance/spare_parent.html.twig | 1 - .../Tests/Loader/Fixtures/named/index.html | 1 - .../Loader/Fixtures/named_bis/index.html | 1 - .../Loader/Fixtures/named_final/index.html | 1 - .../Fixtures/named_quater/named_absolute.html | 1 - .../Loader/Fixtures/named_ter/index.html | 1 - .../Tests/Loader/Fixtures/normal/index.html | 1 - .../Loader/Fixtures/normal_bis/index.html | 1 - .../Loader/Fixtures/normal_final/index.html | 1 - .../Loader/Fixtures/normal_ter/index.html | 1 - .../Loader/Fixtures/phar/phar-sample.phar | Bin 6786 -> 0 bytes .../Fixtures/themes/theme1/blocks.html.twig | 3 - .../Fixtures/themes/theme2/blocks.html.twig | 3 - .../test/Twig/Tests/NativeExtensionTest.php | 32 - .../test/Twig/Tests/Node/AutoEscapeTest.php | 32 - .../Twig/Tests/Node/BlockReferenceTest.php | 31 - .../twig/test/Twig/Tests/Node/BlockTest.php | 39 - .../twig/twig/test/Twig/Tests/Node/DoTest.php | 32 - .../Twig/Tests/Node/Expression/ArrayTest.php | 37 - .../Tests/Node/Expression/AssignNameTest.php | 29 - .../Tests/Node/Expression/Binary/AddTest.php | 34 - .../Tests/Node/Expression/Binary/AndTest.php | 34 - .../Node/Expression/Binary/ConcatTest.php | 34 - .../Tests/Node/Expression/Binary/DivTest.php | 34 - .../Node/Expression/Binary/FloorDivTest.php | 34 - .../Tests/Node/Expression/Binary/ModTest.php | 34 - .../Tests/Node/Expression/Binary/MulTest.php | 34 - .../Tests/Node/Expression/Binary/OrTest.php | 34 - .../Tests/Node/Expression/Binary/SubTest.php | 34 - .../Twig/Tests/Node/Expression/CallTest.php | 143 - .../Tests/Node/Expression/ConditionalTest.php | 38 - .../Tests/Node/Expression/ConstantTest.php | 30 - .../Twig/Tests/Node/Expression/FilterTest.php | 154 - .../Tests/Node/Expression/FunctionTest.php | 110 - .../Tests/Node/Expression/GetAttrTest.php | 50 - .../Twig/Tests/Node/Expression/NameTest.php | 43 - .../Node/Expression/NullCoalesceTest.php | 31 - .../Node/Expression/PHP53/FilterInclude.php | 6 - .../Node/Expression/PHP53/FunctionInclude.php | 6 - .../Node/Expression/PHP53/TestInclude.php | 6 - .../Twig/Tests/Node/Expression/ParentTest.php | 28 - .../Twig/Tests/Node/Expression/TestTest.php | 82 - .../Tests/Node/Expression/Unary/NegTest.php | 32 - .../Tests/Node/Expression/Unary/NotTest.php | 31 - .../Tests/Node/Expression/Unary/PosTest.php | 31 - .../twig/test/Twig/Tests/Node/ForTest.php | 191 - .../twig/twig/test/Twig/Tests/Node/IfTest.php | 88 - .../twig/test/Twig/Tests/Node/ImportTest.php | 40 - .../twig/test/Twig/Tests/Node/IncludeTest.php | 83 - .../twig/test/Twig/Tests/Node/MacroTest.php | 74 - .../twig/test/Twig/Tests/Node/ModuleTest.php | 223 - .../twig/test/Twig/Tests/Node/PrintTest.php | 29 - .../twig/test/Twig/Tests/Node/SandboxTest.php | 44 - .../Twig/Tests/Node/SandboxedPrintTest.php | 33 - .../twig/test/Twig/Tests/Node/SetTest.php | 69 - .../test/Twig/Tests/Node/SpacelessTest.php | 37 - .../twig/test/Twig/Tests/Node/TextTest.php | 28 - .../Twig/Tests/NodeVisitor/OptimizerTest.php | 124 - .../twig/twig/test/Twig/Tests/ParserTest.php | 198 - .../Tests/Profiler/Dumper/AbstractTest.php | 101 - .../Tests/Profiler/Dumper/BlackfireTest.php | 32 - .../Twig/Tests/Profiler/Dumper/HtmlTest.php | 30 - .../Twig/Tests/Profiler/Dumper/TextTest.php | 30 - .../test/Twig/Tests/Profiler/ProfileTest.php | 110 - .../twig/test/Twig/Tests/TemplateTest.php | 762 -- .../test/Twig/Tests/TemplateWrapperTest.php | 64 - .../twig/test/Twig/Tests/TokenStreamTest.php | 82 - .../Tests/Util/DeprecationCollectorTest.php | 42 - .../twig/test/Twig/Tests/escapingTest.php | 324 - .../wyrihaximus/twig-view/composer.json | 6 +- .../wyrihaximus/twig-view/composer.lock | 686 +- .../twig-view/config/bootstrap.php | 2 +- .../src/Lib/Twig/Extension/Inflector.php | 1 + .../twig-view/src/Lib/Twig/Loader.php | 2 +- .../src/Template/Bake/Element/form.ctp | 6 +- .../src/Template/Bake/Template/index.ctp | 4 +- .../src/Template/Bake/Template/view.ctp | 4 +- .../twig-view/src/View/TwigView.php | 2 +- .../zend-diactoros/.coveralls.yml | 2 - .../zendframework/zend-diactoros/CONDUCT.md | 43 - .../zend-diactoros/CONTRIBUTING.md | 228 - .../zendframework/zend-diactoros/LICENSE.md | 12 - .../zendframework/zend-diactoros/README.md | 34 - .../zend-diactoros/composer.json | 72 - .../zend-diactoros/composer.lock | 1695 ---- .../zendframework/zend-diactoros/mkdocs.yml | 16 - .../Exception/DeprecatedMethodException.php | 19 - .../src/Exception/ExceptionInterface.php | 17 - .../functions/marshal_method_from_sapi.php | 19 - 4911 files changed, 167919 insertions(+), 150352 deletions(-) delete mode 100644 app/vendor/adodb/adodb-php/.gitattributes delete mode 100644 app/vendor/adodb/adodb-php/.gitignore delete mode 100644 app/vendor/adodb/adodb-php/.mailmap delete mode 100644 app/vendor/adodb/adodb-php/adodb-iterator.inc.php create mode 100644 app/vendor/adodb/adodb-php/adodb-loadbalancer.inc.php delete mode 100644 app/vendor/adodb/adodb-php/adodb-php4.inc.php delete mode 100644 app/vendor/adodb/adodb-php/contrib/toxmlrpc.inc.php delete mode 100644 app/vendor/adodb/adodb-php/cute_icons_for_site/adodb.gif delete mode 100644 app/vendor/adodb/adodb-php/cute_icons_for_site/adodb2.gif create mode 100644 app/vendor/adodb/adodb-php/drivers/adodb-odbc_mssql2012.inc.php create mode 100644 app/vendor/adodb/adodb-php/drivers/adodb-pdo_dblib.inc.php create mode 100644 app/vendor/adodb/adodb-php/drivers/adodb-pdo_firebird.inc.php create mode 100644 app/vendor/adodb/adodb-php/lang/adodb-id.inc.php create mode 100644 app/vendor/adodb/adodb-php/lang/adodb-oc.inc.php create mode 100644 app/vendor/adodb/adodb-php/phpdoc delete mode 100644 app/vendor/adodb/adodb-php/replicate/adodb-replicate.inc.php delete mode 100644 app/vendor/adodb/adodb-php/replicate/replicate-steps.php delete mode 100644 app/vendor/adodb/adodb-php/replicate/test-tnb.php delete mode 100644 app/vendor/adodb/adodb-php/scripts/.gitignore delete mode 100644 app/vendor/adodb/adodb-php/scripts/TARADO5.BAT delete mode 100755 app/vendor/adodb/adodb-php/scripts/buildrelease.py delete mode 100755 app/vendor/adodb/adodb-php/scripts/updateversion.py delete mode 100755 app/vendor/adodb/adodb-php/scripts/uploadrelease.py delete mode 100644 app/vendor/adodb/adodb-php/tests/benchmark.php delete mode 100644 app/vendor/adodb/adodb-php/tests/client.php delete mode 100644 app/vendor/adodb/adodb-php/tests/pdo.php delete mode 100644 app/vendor/adodb/adodb-php/tests/test-active-record.php delete mode 100644 app/vendor/adodb/adodb-php/tests/test-active-recs2.php delete mode 100644 app/vendor/adodb/adodb-php/tests/test-active-relations.php delete mode 100644 app/vendor/adodb/adodb-php/tests/test-active-relationsx.php delete mode 100644 app/vendor/adodb/adodb-php/tests/test-datadict.php delete mode 100644 app/vendor/adodb/adodb-php/tests/test-perf.php delete mode 100644 app/vendor/adodb/adodb-php/tests/test-pgblob.php delete mode 100644 app/vendor/adodb/adodb-php/tests/test-php5.php delete mode 100644 app/vendor/adodb/adodb-php/tests/test-xmlschema.php delete mode 100644 app/vendor/adodb/adodb-php/tests/test.php delete mode 100644 app/vendor/adodb/adodb-php/tests/test2.php delete mode 100644 app/vendor/adodb/adodb-php/tests/test3.php delete mode 100644 app/vendor/adodb/adodb-php/tests/test4.php delete mode 100644 app/vendor/adodb/adodb-php/tests/test5.php delete mode 100644 app/vendor/adodb/adodb-php/tests/test_rs_array.php delete mode 100644 app/vendor/adodb/adodb-php/tests/testcache.php delete mode 100644 app/vendor/adodb/adodb-php/tests/testdatabases.inc.php delete mode 100644 app/vendor/adodb/adodb-php/tests/testgenid.php delete mode 100644 app/vendor/adodb/adodb-php/tests/testmssql.php delete mode 100644 app/vendor/adodb/adodb-php/tests/testoci8.php delete mode 100644 app/vendor/adodb/adodb-php/tests/testoci8cursor.php delete mode 100644 app/vendor/adodb/adodb-php/tests/testpaging.php delete mode 100644 app/vendor/adodb/adodb-php/tests/testpear.php delete mode 100644 app/vendor/adodb/adodb-php/tests/testsessions.php delete mode 100644 app/vendor/adodb/adodb-php/tests/time.php delete mode 100644 app/vendor/adodb/adodb-php/tests/tmssql.php delete mode 100644 app/vendor/adodb/adodb-php/tests/xmlschema-mssql.xml delete mode 100644 app/vendor/adodb/adodb-php/tests/xmlschema.xml create mode 100644 app/vendor/ajgl/breakpoint-twig-extension/.github/workflows/tests.yaml delete mode 100644 app/vendor/ajgl/breakpoint-twig-extension/.php_cs create mode 100644 app/vendor/ajgl/breakpoint-twig-extension/.php_cs.dist delete mode 100644 app/vendor/ajgl/breakpoint-twig-extension/.scrutinizer.yml delete mode 100644 app/vendor/ajgl/breakpoint-twig-extension/.travis.yml create mode 120000 app/vendor/bin/var-dump-server create mode 100644 app/vendor/cakephp/bake/Dockerfile create mode 100644 app/vendor/cakephp/bake/docs.Dockerfile rename app/vendor/{psy/psysh/test/fixtures/default/.config/psysh/psysh_history => cakephp/bake/docs/config/__init__.py} (100%) create mode 100644 app/vendor/cakephp/bake/docs/config/all.py create mode 100644 app/vendor/cakephp/bake/docs/en/conf.py create mode 100644 app/vendor/cakephp/bake/docs/en/contents.rst create mode 100644 app/vendor/cakephp/bake/docs/en/development.rst create mode 100644 app/vendor/cakephp/bake/docs/en/index.rst create mode 100644 app/vendor/cakephp/bake/docs/en/usage.rst create mode 100644 app/vendor/cakephp/bake/docs/es/conf.py create mode 100644 app/vendor/cakephp/bake/docs/es/contents.rst create mode 100644 app/vendor/cakephp/bake/docs/es/development.rst create mode 100644 app/vendor/cakephp/bake/docs/es/index.rst create mode 100644 app/vendor/cakephp/bake/docs/es/usage.rst create mode 100644 app/vendor/cakephp/bake/docs/fr/conf.py create mode 100644 app/vendor/cakephp/bake/docs/fr/contents.rst create mode 100644 app/vendor/cakephp/bake/docs/fr/development.rst create mode 100644 app/vendor/cakephp/bake/docs/fr/index.rst create mode 100644 app/vendor/cakephp/bake/docs/fr/usage.rst create mode 100644 app/vendor/cakephp/bake/docs/ja/conf.py create mode 100644 app/vendor/cakephp/bake/docs/ja/contents.rst create mode 100644 app/vendor/cakephp/bake/docs/ja/development.rst create mode 100644 app/vendor/cakephp/bake/docs/ja/index.rst create mode 100644 app/vendor/cakephp/bake/docs/ja/usage.rst create mode 100644 app/vendor/cakephp/bake/docs/pt/conf.py create mode 100644 app/vendor/cakephp/bake/docs/pt/contents.rst create mode 100644 app/vendor/cakephp/bake/docs/pt/development.rst create mode 100644 app/vendor/cakephp/bake/docs/pt/index.rst create mode 100644 app/vendor/cakephp/bake/docs/pt/usage.rst create mode 100644 app/vendor/cakephp/bake/docs/ru/conf.py create mode 100644 app/vendor/cakephp/bake/docs/ru/contents.rst create mode 100644 app/vendor/cakephp/bake/docs/ru/development.rst create mode 100644 app/vendor/cakephp/bake/docs/ru/index.rst create mode 100644 app/vendor/cakephp/bake/docs/ru/usage.rst create mode 100644 app/vendor/cakephp/bake/phpcs.xml.dist create mode 100644 app/vendor/cakephp/cakephp-codesniffer/CakePHP/Sniffs/PHP/CommaAfterArrayItemSniff.php create mode 100644 app/vendor/cakephp/cakephp-codesniffer/CakePHP/Tests/Formatting/UseInAlphabeticalOrderUnitTest.3.inc create mode 100644 app/vendor/cakephp/cakephp-codesniffer/phpcs.xml create mode 100644 app/vendor/cakephp/cakephp-codesniffer/phpcs.xml.dist create mode 100644 app/vendor/cakephp/cakephp/src/Datasource/SimplePaginator.php create mode 100644 app/vendor/cakephp/cakephp/src/Http/Middleware/CspMiddleware.php create mode 100644 app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Email/MailContainsAttachment.php create mode 100644 app/vendor/cakephp/cakephp/src/TestSuite/MockBuilder.php create mode 100644 app/vendor/cakephp/cakephp/src/TestSuite/Stub/MissingConsoleInputException.php create mode 100644 app/vendor/cakephp/chronos/.appveyor.yml create mode 100644 app/vendor/cakephp/debug_kit/.github/workflows/ci.yml delete mode 100644 app/vendor/cakephp/debug_kit/.jshintrc delete mode 100644 app/vendor/cakephp/debug_kit/.stickler.yml create mode 100644 app/vendor/cakephp/debug_kit/Dockerfile create mode 100644 app/vendor/cakephp/debug_kit/docs.Dockerfile rename app/vendor/{psy/psysh/test/fixtures/default/.local/share/psysh/php_manual.sqlite => cakephp/debug_kit/docs/config/__init__.py} (100%) create mode 100644 app/vendor/cakephp/debug_kit/docs/config/all.py create mode 100644 app/vendor/cakephp/debug_kit/docs/en/conf.py create mode 100644 app/vendor/cakephp/debug_kit/docs/en/contents.rst create mode 100644 app/vendor/cakephp/debug_kit/docs/en/index.rst create mode 100644 app/vendor/cakephp/debug_kit/docs/fr/conf.py create mode 100644 app/vendor/cakephp/debug_kit/docs/fr/contents.rst create mode 100644 app/vendor/cakephp/debug_kit/docs/fr/index.rst create mode 100644 app/vendor/cakephp/debug_kit/docs/ja/conf.py create mode 100644 app/vendor/cakephp/debug_kit/docs/ja/contents.rst create mode 100644 app/vendor/cakephp/debug_kit/docs/ja/index.rst create mode 100644 app/vendor/cakephp/debug_kit/docs/pt/conf.py create mode 100644 app/vendor/cakephp/debug_kit/docs/pt/contents.rst create mode 100644 app/vendor/cakephp/debug_kit/docs/pt/index.rst create mode 100644 app/vendor/cakephp/debug_kit/src/Controller/DashboardController.php create mode 100644 app/vendor/cakephp/debug_kit/src/Controller/DebugKitController.php create mode 100644 app/vendor/cakephp/debug_kit/src/Template/Dashboard/index.ctp create mode 100644 app/vendor/cakephp/debug_kit/src/Template/Layout/dashboard.ctp delete mode 100644 app/vendor/cakephp/plugin-installer/.editorconfig delete mode 100644 app/vendor/cakephp/plugin-installer/.travis.yml delete mode 100644 app/vendor/cakephp/plugin-installer/phpunit.xml.dist create mode 100644 app/vendor/cakephp/plugin-installer/src/Plugin.php delete mode 100644 app/vendor/cakephp/plugin-installer/tests/Installer/PluginInstaller.php create mode 100644 app/vendor/cakephp/plugin-installer/tests/TestCase/PluginTest.php delete mode 100644 app/vendor/cakephp/plugin-installer/tests/bootstrap.php create mode 100644 app/vendor/cakephp/plugin-installer/tests/php56/TestCase/Installer/PluginInstallerTest.php create mode 100644 app/vendor/cakephp/plugin-installer/tests/php56/TestCase/PHPUnitAssertionCompatTrait.php create mode 100644 app/vendor/cakephp/plugin-installer/tests/php56/TestCase/PluginTest.php create mode 100644 app/vendor/composer/InstalledVersions.php create mode 100644 app/vendor/composer/composer/.editorconfig delete mode 100644 app/vendor/composer/composer/.github/CONTRIBUTING.md delete mode 100644 app/vendor/composer/composer/.github/ISSUE_TEMPLATE.md delete mode 100644 app/vendor/composer/composer/.php_cs delete mode 100644 app/vendor/composer/composer/.travis.yml create mode 100644 app/vendor/composer/composer/CODE_OF_CONDUCT.md create mode 100644 app/vendor/composer/composer/UPGRADE-2.0.md delete mode 100644 app/vendor/composer/composer/appveyor.yml create mode 100644 app/vendor/composer/composer/doc/07-runtime.md rename app/vendor/composer/composer/doc/{07-community.md => 08-community.md} (57%) create mode 100644 app/vendor/composer/composer/doc/articles/authentication-for-private-packages.md rename app/vendor/composer/composer/doc/articles/{handling-private-packages-with-satis.md => handling-private-packages.md} (92%) delete mode 100644 app/vendor/composer/composer/doc/articles/http-basic-authentication.md create mode 100644 app/vendor/composer/composer/doc/articles/repository-priorities.md create mode 100644 app/vendor/composer/composer/doc/articles/resolving-merge-conflicts.md delete mode 100644 app/vendor/composer/composer/phpunit.xml.dist create mode 100644 app/vendor/composer/composer/src/Composer/Command/FundCommand.php create mode 100644 app/vendor/composer/composer/src/Composer/Command/ReinstallCommand.php create mode 100644 app/vendor/composer/composer/src/Composer/Console/GithubActionError.php create mode 100644 app/vendor/composer/composer/src/Composer/DependencyResolver/LocalRepoTransaction.php create mode 100644 app/vendor/composer/composer/src/Composer/DependencyResolver/LockTransaction.php create mode 100644 app/vendor/composer/composer/src/Composer/DependencyResolver/MultiConflictRule.php create mode 100644 app/vendor/composer/composer/src/Composer/DependencyResolver/PoolBuilder.php rename app/vendor/composer/composer/src/Composer/{Script/PackageEvent.php => Downloader/MaxFileSizeExceededException.php} (55%) delete mode 100644 app/vendor/composer/composer/src/Composer/Downloader/PearPackageExtractor.php rename app/vendor/composer/composer/src/Composer/{Script/CommandEvent.php => Exception/IrrecoverableDownloadException.php} (66%) create mode 100644 app/vendor/composer/composer/src/Composer/InstalledVersions.php delete mode 100644 app/vendor/composer/composer/src/Composer/Installer/PearBinaryInstaller.php delete mode 100644 app/vendor/composer/composer/src/Composer/Installer/PearInstaller.php create mode 100644 app/vendor/composer/composer/src/Composer/Package/CompleteAliasPackage.php delete mode 100644 app/vendor/composer/composer/src/Composer/Package/LinkConstraint/EmptyConstraint.php delete mode 100644 app/vendor/composer/composer/src/Composer/Package/LinkConstraint/LinkConstraintInterface.php delete mode 100644 app/vendor/composer/composer/src/Composer/Package/LinkConstraint/MultiConstraint.php delete mode 100644 app/vendor/composer/composer/src/Composer/Package/LinkConstraint/SpecificConstraint.php delete mode 100644 app/vendor/composer/composer/src/Composer/Package/LinkConstraint/VersionConstraint.php create mode 100644 app/vendor/composer/composer/src/Composer/Package/Version/StabilityFilter.php create mode 100644 app/vendor/composer/composer/src/Composer/Platform/HhvmDetector.php create mode 100644 app/vendor/composer/composer/src/Composer/Platform/Runtime.php create mode 100644 app/vendor/composer/composer/src/Composer/Platform/Version.php create mode 100644 app/vendor/composer/composer/src/Composer/Plugin/PostFileDownloadEvent.php create mode 100644 app/vendor/composer/composer/src/Composer/Plugin/PrePoolCreateEvent.php create mode 100644 app/vendor/composer/composer/src/Composer/Repository/FilterRepository.php rename app/vendor/composer/composer/src/Composer/Repository/{BaseRepository.php => InstalledRepository.php} (55%) create mode 100644 app/vendor/composer/composer/src/Composer/Repository/LockArrayRepository.php delete mode 100644 app/vendor/composer/composer/src/Composer/Repository/Pear/BaseChannelReader.php delete mode 100644 app/vendor/composer/composer/src/Composer/Repository/Pear/ChannelInfo.php delete mode 100644 app/vendor/composer/composer/src/Composer/Repository/Pear/ChannelReader.php delete mode 100644 app/vendor/composer/composer/src/Composer/Repository/Pear/ChannelRest10Reader.php delete mode 100644 app/vendor/composer/composer/src/Composer/Repository/Pear/ChannelRest11Reader.php delete mode 100644 app/vendor/composer/composer/src/Composer/Repository/Pear/DependencyConstraint.php delete mode 100644 app/vendor/composer/composer/src/Composer/Repository/Pear/DependencyInfo.php delete mode 100644 app/vendor/composer/composer/src/Composer/Repository/Pear/PackageDependencyParser.php delete mode 100644 app/vendor/composer/composer/src/Composer/Repository/Pear/PackageInfo.php delete mode 100644 app/vendor/composer/composer/src/Composer/Repository/Pear/ReleaseInfo.php create mode 100644 app/vendor/composer/composer/src/Composer/Repository/RepositorySet.php create mode 100644 app/vendor/composer/composer/src/Composer/Repository/RootPackageRepository.php create mode 100644 app/vendor/composer/composer/src/Composer/Repository/VersionCacheInterface.php create mode 100644 app/vendor/composer/composer/src/Composer/Util/Http/CurlDownloader.php create mode 100644 app/vendor/composer/composer/src/Composer/Util/Http/CurlResponse.php create mode 100644 app/vendor/composer/composer/src/Composer/Util/Http/ProxyHelper.php create mode 100644 app/vendor/composer/composer/src/Composer/Util/Http/ProxyManager.php create mode 100644 app/vendor/composer/composer/src/Composer/Util/Http/RequestProxy.php create mode 100644 app/vendor/composer/composer/src/Composer/Util/Http/Response.php create mode 100644 app/vendor/composer/composer/src/Composer/Util/HttpDownloader.php create mode 100644 app/vendor/composer/composer/src/Composer/Util/Loop.php create mode 100644 app/vendor/composer/composer/src/Composer/Util/MetadataMinifier.php create mode 100644 app/vendor/composer/composer/src/Composer/Util/PackageSorter.php delete mode 100644 app/vendor/composer/composer/src/Composer/Util/SpdxLicense.php create mode 100644 app/vendor/composer/composer/src/Composer/Util/SyncHelper.php create mode 100644 app/vendor/composer/composer/src/Composer/Util/Tar.php create mode 100644 app/vendor/composer/composer/src/Composer/Util/Zip.php delete mode 100644 app/vendor/composer/composer/src/Composer/XdebugHandler.php create mode 100644 app/vendor/composer/installed.php create mode 100644 app/vendor/composer/metadata-minifier/LICENSE create mode 100644 app/vendor/composer/metadata-minifier/README.md create mode 100644 app/vendor/composer/metadata-minifier/composer.json create mode 100644 app/vendor/composer/metadata-minifier/phpstan.neon.dist create mode 100644 app/vendor/composer/metadata-minifier/src/MetadataMinifier.php create mode 100644 app/vendor/composer/semver/src/CompilingMatcher.php delete mode 100644 app/vendor/composer/semver/src/Constraint/AbstractConstraint.php create mode 100644 app/vendor/composer/semver/src/Constraint/Bound.php rename app/vendor/composer/semver/src/Constraint/{EmptyConstraint.php => MatchAllConstraint.php} (59%) create mode 100644 app/vendor/composer/semver/src/Constraint/MatchNoneConstraint.php create mode 100644 app/vendor/composer/semver/src/Interval.php create mode 100644 app/vendor/composer/semver/src/Intervals.php delete mode 100644 app/vendor/composer/spdx-licenses/.php_cs.dist create mode 100644 app/vendor/composer/xdebug-handler/UPGRADE.md delete mode 100644 app/vendor/dnoegel/php-xdg-base-dir/.gitignore delete mode 100644 app/vendor/dnoegel/php-xdg-base-dir/README.md delete mode 100644 app/vendor/dnoegel/php-xdg-base-dir/composer.json delete mode 100644 app/vendor/dnoegel/php-xdg-base-dir/phpunit.xml.dist delete mode 100644 app/vendor/dnoegel/php-xdg-base-dir/src/Xdg.php delete mode 100644 app/vendor/dnoegel/php-xdg-base-dir/tests/XdgTest.php create mode 100644 app/vendor/doctrine/cache/UPGRADE-1.11.md rename app/vendor/doctrine/cache/{UPGRADE.md => UPGRADE-1.4.md} (100%) delete mode 100644 app/vendor/doctrine/cache/docs/en/index.rst delete mode 100644 app/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcCache.php delete mode 100644 app/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcuCache.php delete mode 100644 app/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ArrayCache.php delete mode 100644 app/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ChainCache.php delete mode 100644 app/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CouchbaseBucketCache.php delete mode 100644 app/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CouchbaseCache.php delete mode 100644 app/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ExtMongoDBCache.php delete mode 100644 app/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FileCache.php delete mode 100644 app/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FilesystemCache.php delete mode 100644 app/vendor/doctrine/cache/lib/Doctrine/Common/Cache/LegacyMongoDBCache.php delete mode 100644 app/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MemcacheCache.php delete mode 100644 app/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MemcachedCache.php delete mode 100644 app/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MongoDBCache.php delete mode 100644 app/vendor/doctrine/cache/lib/Doctrine/Common/Cache/PhpFileCache.php delete mode 100644 app/vendor/doctrine/cache/lib/Doctrine/Common/Cache/PredisCache.php create mode 100644 app/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/CacheAdapter.php create mode 100644 app/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/CacheItem.php create mode 100644 app/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/DoctrineProvider.php create mode 100644 app/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/InvalidArgument.php create mode 100644 app/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/TypedCacheItem.php delete mode 100644 app/vendor/doctrine/cache/lib/Doctrine/Common/Cache/RedisCache.php delete mode 100644 app/vendor/doctrine/cache/lib/Doctrine/Common/Cache/RiakCache.php delete mode 100644 app/vendor/doctrine/cache/lib/Doctrine/Common/Cache/SQLite3Cache.php delete mode 100644 app/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Version.php delete mode 100644 app/vendor/doctrine/cache/lib/Doctrine/Common/Cache/VoidCache.php delete mode 100644 app/vendor/doctrine/cache/lib/Doctrine/Common/Cache/WinCacheCache.php delete mode 100644 app/vendor/doctrine/cache/lib/Doctrine/Common/Cache/XcacheCache.php delete mode 100644 app/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ZendDataCache.php delete mode 100644 app/vendor/doctrine/dbal/.doctrine-project.json create mode 100644 app/vendor/doctrine/dbal/CONTRIBUTING.md delete mode 100644 app/vendor/doctrine/dbal/SECURITY.md delete mode 100644 app/vendor/doctrine/dbal/UPGRADE.md create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Abstraction/Result.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connections/PrimaryReadReplicaConnection.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractException.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractSQLServerDriver/Exception/PortWithoutHost.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Exception.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/FetchUtils.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/IBMDB2/Connection.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/IBMDB2/DataSourceName.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/IBMDB2/Driver.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/IBMDB2/Exception/CannotCopyStreamToStream.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/IBMDB2/Exception/CannotCreateTemporaryFile.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/IBMDB2/Exception/CannotWriteToTemporaryFile.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/IBMDB2/Exception/ConnectionError.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/IBMDB2/Exception/ConnectionFailed.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/IBMDB2/Exception/PrepareFailed.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/IBMDB2/Exception/StatementError.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/IBMDB2/Statement.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/Connection.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/Exception/ConnectionError.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/Exception/ConnectionFailed.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/Exception/FailedReadingStreamOffset.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/Exception/InvalidOption.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/Exception/StatementError.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/Exception/UnknownType.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/Statement.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/OCI8/Connection.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/OCI8/Exception/NonTerminatedStringLiteral.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/OCI8/Exception/SequenceDoesNotExist.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/OCI8/Exception/UnknownParameterIndex.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/OCI8/Statement.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Connection.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/MySQL/Driver.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/OCI/Driver.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/PgSQL/Driver.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/SQLSrv/Connection.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/SQLSrv/Driver.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/SQLSrv/Statement.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/SQLite/Driver.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Statement.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOQueryImplementation.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatementImplementations.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Result.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/SQLSrv/Connection.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/SQLSrv/Exception/Error.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/SQLSrv/Statement.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Exception.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Exception/ConnectionLost.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Exception/NoKeyValue.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/ForwardCompatibility/DriverResultStatement.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/ForwardCompatibility/DriverStatement.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/ForwardCompatibility/Result.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Portability/OptimizeFlags.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Result.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Tools/Console/ConnectionNotFound.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Tools/Console/ConnectionProvider.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Tools/Console/ConnectionProvider/SingleConnectionProvider.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/AsciiStringType.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/TypeRegistry.php create mode 100644 app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/Types.php create mode 100644 app/vendor/doctrine/deprecations/.github/workflows/ci.yml rename app/vendor/{seld/jsonlint => doctrine/deprecations}/.gitignore (61%) create mode 100644 app/vendor/doctrine/deprecations/README.md create mode 100644 app/vendor/doctrine/deprecations/composer.json create mode 100644 app/vendor/doctrine/deprecations/lib/Doctrine/Deprecations/Deprecation.php create mode 100644 app/vendor/doctrine/deprecations/lib/Doctrine/Deprecations/PHPUnit/VerifyDeprecations.php create mode 100644 app/vendor/doctrine/deprecations/phpcs.xml create mode 100644 app/vendor/doctrine/deprecations/phpunit.xml.dist create mode 100644 app/vendor/doctrine/deprecations/test_fixtures/src/Foo.php create mode 100644 app/vendor/doctrine/deprecations/test_fixtures/src/RootDeprecation.php create mode 100644 app/vendor/doctrine/deprecations/tests/Doctrine/Deprecations/DeprecationTest.php create mode 100644 app/vendor/doctrine/deprecations/tests/Doctrine/Deprecations/VerifyDeprecationsTest.php create mode 100644 app/vendor/doctrine/event-manager/.doctrine-project.json delete mode 100644 app/vendor/doctrine/event-manager/.scrutinizer.yml delete mode 100644 app/vendor/doctrine/event-manager/docs/en/index.rst delete mode 100644 app/vendor/doctrine/event-manager/docs/en/reference/index.rst delete mode 100644 app/vendor/doctrine/event-manager/docs/en/sidebar.rst delete mode 100644 app/vendor/jakub-onderka/php-console-color/.gitignore delete mode 100644 app/vendor/jakub-onderka/php-console-color/.travis.yml delete mode 100644 app/vendor/jakub-onderka/php-console-color/LICENSE delete mode 100644 app/vendor/jakub-onderka/php-console-color/README.md delete mode 100644 app/vendor/jakub-onderka/php-console-color/build.xml delete mode 100644 app/vendor/jakub-onderka/php-console-color/composer.json delete mode 100644 app/vendor/jakub-onderka/php-console-color/example.php delete mode 100644 app/vendor/jakub-onderka/php-console-color/phpunit.xml delete mode 100644 app/vendor/jakub-onderka/php-console-color/src/ConsoleColor.php delete mode 100644 app/vendor/jakub-onderka/php-console-color/src/InvalidStyleException.php delete mode 100644 app/vendor/jakub-onderka/php-console-color/tests/ConsoleColorTest.php delete mode 100644 app/vendor/jakub-onderka/php-console-highlighter/.gitignore delete mode 100644 app/vendor/jakub-onderka/php-console-highlighter/.travis.yml delete mode 100644 app/vendor/jakub-onderka/php-console-highlighter/README.md delete mode 100644 app/vendor/jakub-onderka/php-console-highlighter/build.xml delete mode 100644 app/vendor/jakub-onderka/php-console-highlighter/composer.json delete mode 100644 app/vendor/jakub-onderka/php-console-highlighter/examples/snippet.php delete mode 100644 app/vendor/jakub-onderka/php-console-highlighter/examples/whole_file.php delete mode 100644 app/vendor/jakub-onderka/php-console-highlighter/examples/whole_file_line_numbers.php delete mode 100644 app/vendor/jakub-onderka/php-console-highlighter/phpunit.xml delete mode 100644 app/vendor/jakub-onderka/php-console-highlighter/src/JakubOnderka/PhpConsoleHighlighter/Highlighter.php delete mode 100644 app/vendor/jakub-onderka/php-console-highlighter/tests/JakubOnderka/PhpConsoleHighligter/HigligterTest.php delete mode 100644 app/vendor/jakub-onderka/php-console-highlighter/tests/bootstrap.php delete mode 100644 app/vendor/justinrainbow/json-schema/.gitattributes rename app/vendor/{zendframework/zend-diactoros => laminas/laminas-diactoros}/CHANGELOG.md (61%) create mode 100644 app/vendor/laminas/laminas-diactoros/COPYRIGHT.md create mode 100644 app/vendor/laminas/laminas-diactoros/LICENSE.md create mode 100644 app/vendor/laminas/laminas-diactoros/README.md create mode 100644 app/vendor/laminas/laminas-diactoros/composer.json rename app/vendor/{zendframework/zend-diactoros => laminas/laminas-diactoros}/src/AbstractSerializer.php (92%) rename app/vendor/{zendframework/zend-diactoros => laminas/laminas-diactoros}/src/CallbackStream.php (89%) create mode 100644 app/vendor/laminas/laminas-diactoros/src/Exception/DeprecatedMethodException.php create mode 100644 app/vendor/laminas/laminas-diactoros/src/Exception/ExceptionInterface.php rename app/vendor/{zendframework/zend-diactoros => laminas/laminas-diactoros}/src/HeaderSecurity.php (88%) rename app/vendor/{zendframework/zend-diactoros => laminas/laminas-diactoros}/src/MessageTrait.php (97%) rename app/vendor/{zendframework/zend-diactoros => laminas/laminas-diactoros}/src/PhpInputStream.php (82%) rename app/vendor/{zendframework/zend-diactoros => laminas/laminas-diactoros}/src/RelativeStream.php (89%) rename app/vendor/{zendframework/zend-diactoros => laminas/laminas-diactoros}/src/Request.php (84%) rename app/vendor/{zendframework/zend-diactoros => laminas/laminas-diactoros}/src/Request/ArraySerializer.php (87%) rename app/vendor/{zendframework/zend-diactoros => laminas/laminas-diactoros}/src/Request/Serializer.php (89%) rename app/vendor/{zendframework/zend-diactoros => laminas/laminas-diactoros}/src/RequestTrait.php (96%) rename app/vendor/{zendframework/zend-diactoros => laminas/laminas-diactoros}/src/Response.php (94%) rename app/vendor/{zendframework/zend-diactoros => laminas/laminas-diactoros}/src/Response/ArraySerializer.php (87%) rename app/vendor/{zendframework/zend-diactoros => laminas/laminas-diactoros}/src/Response/EmitterInterface.php (64%) rename app/vendor/{zendframework/zend-diactoros => laminas/laminas-diactoros}/src/Response/EmptyResponse.php (64%) rename app/vendor/{zendframework/zend-diactoros => laminas/laminas-diactoros}/src/Response/HtmlResponse.php (82%) rename app/vendor/{zendframework/zend-diactoros => laminas/laminas-diactoros}/src/Response/InjectContentTypeTrait.php (66%) rename app/vendor/{zendframework/zend-diactoros => laminas/laminas-diactoros}/src/Response/JsonResponse.php (92%) rename app/vendor/{zendframework/zend-diactoros => laminas/laminas-diactoros}/src/Response/RedirectResponse.php (76%) rename app/vendor/{zendframework/zend-diactoros => laminas/laminas-diactoros}/src/Response/SapiEmitter.php (68%) rename app/vendor/{zendframework/zend-diactoros => laminas/laminas-diactoros}/src/Response/SapiEmitterTrait.php (86%) rename app/vendor/{zendframework/zend-diactoros => laminas/laminas-diactoros}/src/Response/SapiStreamEmitter.php (89%) rename app/vendor/{zendframework/zend-diactoros => laminas/laminas-diactoros}/src/Response/Serializer.php (88%) rename app/vendor/{zendframework/zend-diactoros => laminas/laminas-diactoros}/src/Response/TextResponse.php (82%) rename app/vendor/{zendframework/zend-diactoros => laminas/laminas-diactoros}/src/Response/XmlResponse.php (83%) rename app/vendor/{zendframework/zend-diactoros => laminas/laminas-diactoros}/src/Server.php (92%) rename app/vendor/{zendframework/zend-diactoros => laminas/laminas-diactoros}/src/ServerRequest.php (95%) rename app/vendor/{zendframework/zend-diactoros => laminas/laminas-diactoros}/src/ServerRequestFactory.php (85%) rename app/vendor/{zendframework/zend-diactoros => laminas/laminas-diactoros}/src/Stream.php (96%) rename app/vendor/{zendframework/zend-diactoros => laminas/laminas-diactoros}/src/UploadedFile.php (96%) rename app/vendor/{zendframework/zend-diactoros => laminas/laminas-diactoros}/src/Uri.php (98%) create mode 100644 app/vendor/laminas/laminas-diactoros/src/functions/create_uploaded_file.legacy.php rename app/vendor/{zendframework/zend-diactoros => laminas/laminas-diactoros}/src/functions/create_uploaded_file.php (74%) create mode 100644 app/vendor/laminas/laminas-diactoros/src/functions/marshal_headers_from_sapi.legacy.php rename app/vendor/{zendframework/zend-diactoros => laminas/laminas-diactoros}/src/functions/marshal_headers_from_sapi.php (79%) create mode 100644 app/vendor/laminas/laminas-diactoros/src/functions/marshal_method_from_sapi.legacy.php create mode 100644 app/vendor/laminas/laminas-diactoros/src/functions/marshal_method_from_sapi.php create mode 100644 app/vendor/laminas/laminas-diactoros/src/functions/marshal_protocol_version_from_sapi.legacy.php rename app/vendor/{zendframework/zend-diactoros => laminas/laminas-diactoros}/src/functions/marshal_protocol_version_from_sapi.php (70%) create mode 100644 app/vendor/laminas/laminas-diactoros/src/functions/marshal_uri_from_sapi.legacy.php rename app/vendor/{zendframework/zend-diactoros => laminas/laminas-diactoros}/src/functions/marshal_uri_from_sapi.php (92%) create mode 100644 app/vendor/laminas/laminas-diactoros/src/functions/normalize_server.legacy.php rename app/vendor/{zendframework/zend-diactoros => laminas/laminas-diactoros}/src/functions/normalize_server.php (83%) create mode 100644 app/vendor/laminas/laminas-diactoros/src/functions/normalize_uploaded_files.legacy.php rename app/vendor/{zendframework/zend-diactoros => laminas/laminas-diactoros}/src/functions/normalize_uploaded_files.php (93%) create mode 100644 app/vendor/laminas/laminas-diactoros/src/functions/parse_cookie_header.legacy.php rename app/vendor/{zendframework/zend-diactoros => laminas/laminas-diactoros}/src/functions/parse_cookie_header.php (75%) create mode 100644 app/vendor/laminas/laminas-zendframework-bridge/.github/FUNDING.yml create mode 100644 app/vendor/laminas/laminas-zendframework-bridge/.github/workflows/continuous-integration.yml create mode 100644 app/vendor/laminas/laminas-zendframework-bridge/.github/workflows/release-on-milestone-closed.yml create mode 100644 app/vendor/laminas/laminas-zendframework-bridge/.laminas-ci.json create mode 100644 app/vendor/laminas/laminas-zendframework-bridge/COPYRIGHT.md create mode 100644 app/vendor/laminas/laminas-zendframework-bridge/LICENSE.md create mode 100644 app/vendor/laminas/laminas-zendframework-bridge/README.md create mode 100644 app/vendor/laminas/laminas-zendframework-bridge/composer.json create mode 100644 app/vendor/laminas/laminas-zendframework-bridge/composer.lock create mode 100644 app/vendor/laminas/laminas-zendframework-bridge/config/replacements.php create mode 100644 app/vendor/laminas/laminas-zendframework-bridge/psalm-baseline.xml create mode 100644 app/vendor/laminas/laminas-zendframework-bridge/psalm.xml.dist create mode 100644 app/vendor/laminas/laminas-zendframework-bridge/src/Autoloader.php create mode 100644 app/vendor/laminas/laminas-zendframework-bridge/src/ConfigPostProcessor.php create mode 100644 app/vendor/laminas/laminas-zendframework-bridge/src/Module.php create mode 100644 app/vendor/laminas/laminas-zendframework-bridge/src/Replacements.php create mode 100644 app/vendor/laminas/laminas-zendframework-bridge/src/RewriteRules.php create mode 100644 app/vendor/laminas/laminas-zendframework-bridge/src/autoload.php delete mode 100644 app/vendor/mobiledetect/mobiledetectlib/composer.lock create mode 100644 app/vendor/mobiledetect/mobiledetectlib/docker-compose.yml rename app/vendor/{psy/psysh => nikic/php-parser}/.editorconfig (65%) delete mode 100644 app/vendor/nikic/php-parser/.gitignore delete mode 100644 app/vendor/nikic/php-parser/.travis.yml delete mode 100644 app/vendor/nikic/php-parser/CHANGELOG.md delete mode 100644 app/vendor/nikic/php-parser/UPGRADE-1.0.md delete mode 100644 app/vendor/nikic/php-parser/UPGRADE-2.0.md delete mode 100644 app/vendor/nikic/php-parser/UPGRADE-3.0.md delete mode 100644 app/vendor/nikic/php-parser/UPGRADE-4.0.md delete mode 100644 app/vendor/nikic/php-parser/doc/0_Introduction.markdown delete mode 100644 app/vendor/nikic/php-parser/doc/2_Usage_of_basic_components.markdown delete mode 100644 app/vendor/nikic/php-parser/doc/README.md delete mode 100644 app/vendor/nikic/php-parser/doc/component/AST_builders.markdown delete mode 100644 app/vendor/nikic/php-parser/doc/component/Constant_expression_evaluation.markdown delete mode 100644 app/vendor/nikic/php-parser/doc/component/Error_handling.markdown delete mode 100644 app/vendor/nikic/php-parser/doc/component/FAQ.markdown delete mode 100644 app/vendor/nikic/php-parser/doc/component/JSON_representation.markdown delete mode 100644 app/vendor/nikic/php-parser/doc/component/Lexer.markdown delete mode 100644 app/vendor/nikic/php-parser/doc/component/Name_resolution.markdown delete mode 100644 app/vendor/nikic/php-parser/doc/component/Performance.markdown delete mode 100644 app/vendor/nikic/php-parser/doc/component/Pretty_printing.markdown delete mode 100644 app/vendor/nikic/php-parser/doc/component/Walking_the_AST.markdown create mode 100644 app/vendor/nikic/php-parser/grammar/phpyLang.php create mode 100644 app/vendor/nikic/php-parser/lib/PhpParser/Builder/ClassConst.php create mode 100644 app/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php create mode 100644 app/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php create mode 100644 app/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php create mode 100644 app/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FlexibleDocStringEmulator.php create mode 100644 app/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php create mode 100644 app/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php create mode 100644 app/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php create mode 100644 app/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php create mode 100644 app/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php create mode 100644 app/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php create mode 100644 app/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php create mode 100644 app/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php create mode 100644 app/vendor/nikic/php-parser/lib/PhpParser/Node/Attribute.php create mode 100644 app/vendor/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php create mode 100644 app/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php create mode 100644 app/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Coalesce.php create mode 100644 app/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php create mode 100644 app/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php create mode 100644 app/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php create mode 100644 app/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php create mode 100644 app/vendor/nikic/php-parser/lib/PhpParser/Node/MatchArm.php create mode 100644 app/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php create mode 100644 app/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php create mode 100644 app/vendor/nikic/php-parser/lib/PhpParser/Node/UnionType.php create mode 100644 app/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php create mode 100644 app/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php delete mode 100644 app/vendor/nikic/php-parser/phpunit.xml.dist delete mode 100644 app/vendor/nikic/php-parser/test/PhpParser/Builder/ClassTest.php delete mode 100644 app/vendor/nikic/php-parser/test/PhpParser/Builder/FunctionTest.php delete mode 100644 app/vendor/nikic/php-parser/test/PhpParser/Builder/InterfaceTest.php delete mode 100644 app/vendor/nikic/php-parser/test/PhpParser/Builder/MethodTest.php delete mode 100644 app/vendor/nikic/php-parser/test/PhpParser/Builder/NamespaceTest.php delete mode 100644 app/vendor/nikic/php-parser/test/PhpParser/Builder/ParamTest.php delete mode 100644 app/vendor/nikic/php-parser/test/PhpParser/Builder/PropertyTest.php delete mode 100644 app/vendor/nikic/php-parser/test/PhpParser/Builder/TraitTest.php delete mode 100644 app/vendor/nikic/php-parser/test/PhpParser/Builder/TraitUseAdaptationTest.php delete mode 100644 app/vendor/nikic/php-parser/test/PhpParser/Builder/TraitUseTest.php delete mode 100644 app/vendor/nikic/php-parser/test/PhpParser/Builder/UseTest.php delete mode 100644 app/vendor/nikic/php-parser/test/PhpParser/BuilderFactoryTest.php delete mode 100644 app/vendor/nikic/php-parser/test/PhpParser/CodeParsingTest.php delete mode 100644 app/vendor/nikic/php-parser/test/PhpParser/CodeTestAbstract.php delete mode 100644 app/vendor/nikic/php-parser/test/PhpParser/CodeTestParser.php delete mode 100644 app/vendor/nikic/php-parser/test/PhpParser/CommentTest.php delete mode 100644 app/vendor/nikic/php-parser/test/PhpParser/ConstExprEvaluatorTest.php delete mode 100644 app/vendor/nikic/php-parser/test/PhpParser/ErrorHandler/CollectingTest.php delete mode 100644 app/vendor/nikic/php-parser/test/PhpParser/ErrorHandler/ThrowingTest.php delete mode 100644 app/vendor/nikic/php-parser/test/PhpParser/ErrorTest.php delete mode 100644 app/vendor/nikic/php-parser/test/PhpParser/Internal/DifferTest.php delete mode 100644 app/vendor/nikic/php-parser/test/PhpParser/JsonDecoderTest.php delete mode 100644 app/vendor/nikic/php-parser/test/PhpParser/Lexer/EmulativeTest.php delete mode 100644 app/vendor/nikic/php-parser/test/PhpParser/LexerTest.php delete mode 100644 app/vendor/nikic/php-parser/test/PhpParser/NameContextTest.php delete mode 100644 app/vendor/nikic/php-parser/test/PhpParser/Node/IdentifierTest.php delete mode 100644 app/vendor/nikic/php-parser/test/PhpParser/Node/NameTest.php delete mode 100644 app/vendor/nikic/php-parser/test/PhpParser/Node/Scalar/MagicConstTest.php delete mode 100644 app/vendor/nikic/php-parser/test/PhpParser/Node/Scalar/StringTest.php delete mode 100644 app/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/ClassConstTest.php delete mode 100644 app/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/ClassMethodTest.php delete mode 100644 app/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/ClassTest.php delete mode 100644 app/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/InterfaceTest.php delete mode 100644 app/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/PropertyTest.php delete mode 100644 app/vendor/nikic/php-parser/test/PhpParser/NodeAbstractTest.php delete mode 100644 app/vendor/nikic/php-parser/test/PhpParser/NodeDumperTest.php delete mode 100644 app/vendor/nikic/php-parser/test/PhpParser/NodeFinderTest.php delete mode 100644 app/vendor/nikic/php-parser/test/PhpParser/NodeTraverserTest.php delete mode 100644 app/vendor/nikic/php-parser/test/PhpParser/NodeVisitor/FindingVisitorTest.php delete mode 100644 app/vendor/nikic/php-parser/test/PhpParser/NodeVisitor/FirstFindingVisitorTest.php delete mode 100644 app/vendor/nikic/php-parser/test/PhpParser/NodeVisitor/NameResolverTest.php delete mode 100644 app/vendor/nikic/php-parser/test/PhpParser/Parser/MultipleTest.php delete mode 100644 app/vendor/nikic/php-parser/test/PhpParser/Parser/Php5Test.php delete mode 100644 app/vendor/nikic/php-parser/test/PhpParser/Parser/Php7Test.php delete mode 100644 app/vendor/nikic/php-parser/test/PhpParser/ParserFactoryTest.php delete mode 100644 app/vendor/nikic/php-parser/test/PhpParser/ParserTest.php delete mode 100644 app/vendor/nikic/php-parser/test/PhpParser/PrettyPrinterTest.php delete mode 100644 app/vendor/nikic/php-parser/test/bootstrap.php delete mode 100644 app/vendor/nikic/php-parser/test/code/formatPreservation/anonClasses.test delete mode 100644 app/vendor/nikic/php-parser/test/code/formatPreservation/basic.test delete mode 100644 app/vendor/nikic/php-parser/test/code/formatPreservation/blockConversion.test delete mode 100644 app/vendor/nikic/php-parser/test/code/formatPreservation/comments.test delete mode 100644 app/vendor/nikic/php-parser/test/code/formatPreservation/fixup.test delete mode 100644 app/vendor/nikic/php-parser/test/code/formatPreservation/inlineHtml.test delete mode 100644 app/vendor/nikic/php-parser/test/code/formatPreservation/insertionOfNullable.test delete mode 100644 app/vendor/nikic/php-parser/test/code/formatPreservation/listInsertion.test delete mode 100644 app/vendor/nikic/php-parser/test/code/formatPreservation/listInsertionIndentation.test delete mode 100644 app/vendor/nikic/php-parser/test/code/formatPreservation/listRemoval.test delete mode 100644 app/vendor/nikic/php-parser/test/code/formatPreservation/modifierChange.test delete mode 100644 app/vendor/nikic/php-parser/test/code/formatPreservation/nopCommentAtEnd.test delete mode 100644 app/vendor/nikic/php-parser/test/code/formatPreservation/removalViaNull.test delete mode 100644 app/vendor/nikic/php-parser/test/code/formatPreservation/traitAlias.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/blockComments.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/commentAtEndOfClass.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/comments.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/errorHandling/eofError.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/errorHandling/lexerErrors.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/errorHandling/recovery.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/expr/arrayDef.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/expr/arrayDestructuring.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/expr/assign.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/expr/assignNewByRef.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/expr/cast.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/expr/clone.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/expr/closure.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/expr/comparison.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/expr/constant_expr.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/expr/errorSuppress.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/expr/exit.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/args.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/constFetch.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/constantDeref.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/funcCall.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/newDeref.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/objectAccess.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/simpleArrayAccess.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/staticCall.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/staticPropertyFetch.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/expr/includeAndEval.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/expr/issetAndEmpty.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/expr/listReferences.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/expr/listWithKeys.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/expr/logic.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/expr/math.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/expr/new.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/expr/newWithoutClass.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/expr/print.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/expr/shellExec.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/expr/ternaryAndCoalesce.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/expr/trailingCommas.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/expr/uvs/globalNonSimpleVarError.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/expr/uvs/indirectCall.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/expr/uvs/isset.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/expr/uvs/misc.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/expr/uvs/new.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/expr/uvs/staticProperty.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/expr/variable.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/exprStmtMode.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/scalar/constantString.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/scalar/docString.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/scalar/docStringNewlines.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/scalar/encapsedNegVarOffset.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/scalar/encapsedString.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/scalar/float.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/scalar/int.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/scalar/invalidOctal.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/scalar/magicConst.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/scalar/unicodeEscape.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/semiReserved.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/blocklessStatement.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/class/abstract.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/class/anonymous.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/class/conditional.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/class/constModifierErrors.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/class/constModifiers.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/class/final.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/class/implicitPublic.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/class/interface.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/class/modifier.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/class/name.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/class/php4Style.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/class/simple.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/class/staticMethod.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/class/trait.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/const.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/controlFlow.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/declare.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/echo.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/function/builtinTypeDeclarations.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/function/byRef.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/function/conditional.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/function/defaultValues.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/function/nullableTypes.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/function/returnTypes.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/function/specialVars.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/function/typeDeclarations.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/function/variadic.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/function/variadicDefaultValue.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/generator/basic.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/generator/yieldPrecedence.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/generator/yieldUnaryPrecedence.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/haltCompiler.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/haltCompilerInvalidSyntax.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/haltCompilerOffset.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/haltCompilerOutermostScope.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/hashbang.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/if.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/inlineHTML.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/loop/do.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/loop/for.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/loop/foreach.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/loop/while.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/multiCatch.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/namespace/alias.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/namespace/braced.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/namespace/commentAfterNamespace.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/namespace/groupUse.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/namespace/groupUseErrors.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/namespace/groupUsePositions.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/namespace/groupUseTrailingComma.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/namespace/invalidName.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/namespace/mix.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/namespace/name.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/namespace/nested.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/namespace/notBraced.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/namespace/nsAfterHashbang.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/namespace/outsideStmt.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/namespace/outsideStmtInvalid.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/switch.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/tryCatch.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/tryWithoutCatch.test delete mode 100644 app/vendor/nikic/php-parser/test/code/parser/stmt/unset.test delete mode 100644 app/vendor/nikic/php-parser/test/code/prettyPrinter/comments.test delete mode 100644 app/vendor/nikic/php-parser/test/code/prettyPrinter/commentsInCommaList.test delete mode 100644 app/vendor/nikic/php-parser/test/code/prettyPrinter/expr/anonymousClass.test delete mode 100644 app/vendor/nikic/php-parser/test/code/prettyPrinter/expr/arrayDestructuring.test delete mode 100644 app/vendor/nikic/php-parser/test/code/prettyPrinter/expr/call.test delete mode 100644 app/vendor/nikic/php-parser/test/code/prettyPrinter/expr/closure.test delete mode 100644 app/vendor/nikic/php-parser/test/code/prettyPrinter/expr/constant_deref.test delete mode 100644 app/vendor/nikic/php-parser/test/code/prettyPrinter/expr/docStrings.test delete mode 100644 app/vendor/nikic/php-parser/test/code/prettyPrinter/expr/include.test delete mode 100644 app/vendor/nikic/php-parser/test/code/prettyPrinter/expr/intrinsics.test delete mode 100644 app/vendor/nikic/php-parser/test/code/prettyPrinter/expr/list.test delete mode 100644 app/vendor/nikic/php-parser/test/code/prettyPrinter/expr/literals.test delete mode 100644 app/vendor/nikic/php-parser/test/code/prettyPrinter/expr/numbers.test delete mode 100644 app/vendor/nikic/php-parser/test/code/prettyPrinter/expr/operators.test delete mode 100644 app/vendor/nikic/php-parser/test/code/prettyPrinter/expr/parentheses.test delete mode 100644 app/vendor/nikic/php-parser/test/code/prettyPrinter/expr/shortArraySyntax.test delete mode 100644 app/vendor/nikic/php-parser/test/code/prettyPrinter/expr/stringEscaping.test delete mode 100644 app/vendor/nikic/php-parser/test/code/prettyPrinter/expr/uvs.test delete mode 100644 app/vendor/nikic/php-parser/test/code/prettyPrinter/expr/variables.test delete mode 100644 app/vendor/nikic/php-parser/test/code/prettyPrinter/expr/yield.test delete mode 100644 app/vendor/nikic/php-parser/test/code/prettyPrinter/inlineHTMLandPHPtest.file-test delete mode 100644 app/vendor/nikic/php-parser/test/code/prettyPrinter/nestedInlineHTML.test delete mode 100644 app/vendor/nikic/php-parser/test/code/prettyPrinter/onlyInlineHTML.file-test delete mode 100644 app/vendor/nikic/php-parser/test/code/prettyPrinter/onlyPHP.file-test delete mode 100644 app/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/alias.test delete mode 100644 app/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/break_continue.test delete mode 100644 app/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/class.test delete mode 100644 app/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/class_const.test delete mode 100644 app/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/const.test delete mode 100644 app/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/declare.test delete mode 100644 app/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/do_while.test delete mode 100644 app/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/for.test delete mode 100644 app/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/foreach.test delete mode 100644 app/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/function_signatures.test delete mode 100644 app/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/global_static_variables.test delete mode 100644 app/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/goto.test delete mode 100644 app/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/groupUse.test delete mode 100644 app/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/haltCompiler.file-test delete mode 100644 app/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/if.test delete mode 100644 app/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/multiCatch.test delete mode 100644 app/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/namespaces.test delete mode 100644 app/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/nullable_types.test delete mode 100644 app/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/switch.test delete mode 100644 app/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/throw.test delete mode 100644 app/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/traitUse.test delete mode 100644 app/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/tryCatch.test delete mode 100644 app/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/while.test delete mode 100644 app/vendor/nikic/php-parser/test/updateTests.php delete mode 100755 app/vendor/nikic/php-parser/test_old/run-php-src.sh delete mode 100644 app/vendor/nikic/php-parser/test_old/run.php rename app/vendor/{jakub-onderka/php-console-highlighter => paragonie/random_compat}/LICENSE (94%) create mode 100755 app/vendor/paragonie/random_compat/build-phar.sh create mode 100644 app/vendor/paragonie/random_compat/composer.json create mode 100644 app/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey create mode 100644 app/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey.asc create mode 100644 app/vendor/paragonie/random_compat/lib/random.php create mode 100644 app/vendor/paragonie/random_compat/other/build_phar.php create mode 100644 app/vendor/paragonie/random_compat/psalm-autoload.php create mode 100644 app/vendor/paragonie/random_compat/psalm.xml delete mode 100644 app/vendor/psr/log/.gitignore create mode 100644 app/vendor/psr/log/Psr/Log/Test/DummyTest.php delete mode 100644 app/vendor/psy/psysh/.github/CONTRIBUTING.md delete mode 100644 app/vendor/psy/psysh/.gitignore delete mode 100644 app/vendor/psy/psysh/.php_cs delete mode 100644 app/vendor/psy/psysh/.styleci.yml delete mode 100644 app/vendor/psy/psysh/.travis.yml delete mode 100644 app/vendor/psy/psysh/Makefile delete mode 100755 app/vendor/psy/psysh/bin/build-stub delete mode 100644 app/vendor/psy/psysh/box.json.dist delete mode 100644 app/vendor/psy/psysh/phpunit.xml.dist create mode 100644 app/vendor/psy/psysh/src/CodeCleaner/EmptyArrayDimFetchPass.php create mode 100644 app/vendor/psy/psysh/src/CodeCleaner/IssetPass.php create mode 100644 app/vendor/psy/psysh/src/CodeCleaner/LabelContextPass.php delete mode 100644 app/vendor/psy/psysh/src/CodeCleaner/LegacyEmptyPass.php create mode 100644 app/vendor/psy/psysh/src/CodeCleaner/ReturnTypePass.php delete mode 100644 app/vendor/psy/psysh/src/Command/ListCommand/InterfaceEnumerator.php delete mode 100644 app/vendor/psy/psysh/src/Command/ListCommand/TraitEnumerator.php create mode 100644 app/vendor/psy/psysh/src/EnvInterface.php create mode 100644 app/vendor/psy/psysh/src/Exception/UnexpectedTargetException.php delete mode 100644 app/vendor/psy/psysh/src/ExecutionLoop.php create mode 100644 app/vendor/psy/psysh/src/Formatter/ReflectorFormatter.php create mode 100644 app/vendor/psy/psysh/src/Formatter/TraceFormatter.php create mode 100644 app/vendor/psy/psysh/src/Reflection/ReflectionNamespace.php create mode 100644 app/vendor/psy/psysh/src/SuperglobalsEnv.php delete mode 100644 app/vendor/psy/psysh/test/ClassWithSecrets.php delete mode 100644 app/vendor/psy/psysh/test/CodeCleaner/AbstractClassPassTest.php delete mode 100644 app/vendor/psy/psysh/test/CodeCleaner/AssignThisVariablePassTest.php delete mode 100644 app/vendor/psy/psysh/test/CodeCleaner/CallTimePassByReferencePassTest.php delete mode 100644 app/vendor/psy/psysh/test/CodeCleaner/CalledClassPassTest.php delete mode 100644 app/vendor/psy/psysh/test/CodeCleaner/CodeCleanerTestCase.php delete mode 100644 app/vendor/psy/psysh/test/CodeCleaner/ExitPassTest.php delete mode 100644 app/vendor/psy/psysh/test/CodeCleaner/FinalClassPassTest.php delete mode 100644 app/vendor/psy/psysh/test/CodeCleaner/Fixtures/ClassWithCallStatic.php delete mode 100644 app/vendor/psy/psysh/test/CodeCleaner/Fixtures/ClassWithStatic.php delete mode 100644 app/vendor/psy/psysh/test/CodeCleaner/Fixtures/TraitWithStatic.php delete mode 100644 app/vendor/psy/psysh/test/CodeCleaner/FunctionContextPassTest.php delete mode 100644 app/vendor/psy/psysh/test/CodeCleaner/FunctionReturnInWriteContextPassTest.php delete mode 100644 app/vendor/psy/psysh/test/CodeCleaner/ImplicitReturnPassTest.php delete mode 100644 app/vendor/psy/psysh/test/CodeCleaner/InstanceOfPassTest.php delete mode 100644 app/vendor/psy/psysh/test/CodeCleaner/LeavePsyshAlonePassTest.php delete mode 100644 app/vendor/psy/psysh/test/CodeCleaner/LegacyEmptyPassTest.php delete mode 100644 app/vendor/psy/psysh/test/CodeCleaner/ListPassTest.php delete mode 100644 app/vendor/psy/psysh/test/CodeCleaner/LoopContextPassTest.php delete mode 100644 app/vendor/psy/psysh/test/CodeCleaner/MagicConstantsPassTest.php delete mode 100644 app/vendor/psy/psysh/test/CodeCleaner/NamespacePassTest.php delete mode 100644 app/vendor/psy/psysh/test/CodeCleaner/NoReturnValueTest.php delete mode 100644 app/vendor/psy/psysh/test/CodeCleaner/PassableByReferencePassTest.php delete mode 100644 app/vendor/psy/psysh/test/CodeCleaner/RequirePassTest.php delete mode 100644 app/vendor/psy/psysh/test/CodeCleaner/StrictTypesPassTest.php delete mode 100644 app/vendor/psy/psysh/test/CodeCleaner/UseStatementPassTest.php delete mode 100644 app/vendor/psy/psysh/test/CodeCleaner/ValidClassNamePassTest.php delete mode 100644 app/vendor/psy/psysh/test/CodeCleaner/ValidConstantPassTest.php delete mode 100644 app/vendor/psy/psysh/test/CodeCleaner/ValidConstructorPassTest.php delete mode 100644 app/vendor/psy/psysh/test/CodeCleaner/ValidFunctionNamePassTest.php delete mode 100644 app/vendor/psy/psysh/test/CodeCleanerTest.php delete mode 100644 app/vendor/psy/psysh/test/Command/ExitCommandTest.php delete mode 100644 app/vendor/psy/psysh/test/Command/ThrowUpCommandTest.php delete mode 100644 app/vendor/psy/psysh/test/Command/TimeitCommand/TimeitVisitorTest.php delete mode 100644 app/vendor/psy/psysh/test/ConfigurationTest.php delete mode 100644 app/vendor/psy/psysh/test/ConsoleColorFactoryTest.php delete mode 100644 app/vendor/psy/psysh/test/ContextTest.php delete mode 100644 app/vendor/psy/psysh/test/Exception/BreakExceptionTest.php delete mode 100644 app/vendor/psy/psysh/test/Exception/ErrorExceptionTest.php delete mode 100644 app/vendor/psy/psysh/test/Exception/FatalErrorExceptionTest.php delete mode 100644 app/vendor/psy/psysh/test/Exception/ParseErrorExceptionTest.php delete mode 100644 app/vendor/psy/psysh/test/Exception/RuntimeExceptionTest.php delete mode 100644 app/vendor/psy/psysh/test/Exception/ThrowUpExceptionTest.php delete mode 100644 app/vendor/psy/psysh/test/Exception/TypeErrorExceptionTest.php delete mode 100644 app/vendor/psy/psysh/test/FakeShell.php delete mode 100644 app/vendor/psy/psysh/test/Formatter/CodeFormatterTest.php delete mode 100644 app/vendor/psy/psysh/test/Formatter/DocblockFormatterTest.php delete mode 100644 app/vendor/psy/psysh/test/Formatter/Fixtures/BoringTrait.php delete mode 100644 app/vendor/psy/psysh/test/Formatter/Fixtures/SomeClass.php delete mode 100644 app/vendor/psy/psysh/test/Formatter/SignatureFormatterTest.php delete mode 100644 app/vendor/psy/psysh/test/Input/CodeArgumentTest.php delete mode 100644 app/vendor/psy/psysh/test/Input/FilterOptionsTest.php delete mode 100644 app/vendor/psy/psysh/test/Input/ShellInputTest.php delete mode 100644 app/vendor/psy/psysh/test/ParserTestCase.php delete mode 100644 app/vendor/psy/psysh/test/Readline/GNUReadlineTest.php delete mode 100644 app/vendor/psy/psysh/test/Readline/HoaConsoleTest.php delete mode 100644 app/vendor/psy/psysh/test/Readline/LibeditTest.php delete mode 100644 app/vendor/psy/psysh/test/Readline/TransientTest.php delete mode 100644 app/vendor/psy/psysh/test/Reflection/ReflectionClassConstantTest.php delete mode 100644 app/vendor/psy/psysh/test/Reflection/ReflectionConstantBCTest.php delete mode 100644 app/vendor/psy/psysh/test/Reflection/ReflectionConstantTest.php delete mode 100644 app/vendor/psy/psysh/test/Reflection/ReflectionLanguageConstructParameterTest.php delete mode 100644 app/vendor/psy/psysh/test/Reflection/ReflectionLanguageConstructTest.php delete mode 100644 app/vendor/psy/psysh/test/ShellTest.php delete mode 100644 app/vendor/psy/psysh/test/Sudo/SudoVisitorTest.php delete mode 100644 app/vendor/psy/psysh/test/SudoTest.php delete mode 100644 app/vendor/psy/psysh/test/TabCompletion/AutoCompleterTest.php delete mode 100644 app/vendor/psy/psysh/test/TabCompletion/StaticSample.php delete mode 100644 app/vendor/psy/psysh/test/Util/DocblockTest.php delete mode 100644 app/vendor/psy/psysh/test/Util/MirrorTest.php delete mode 100644 app/vendor/psy/psysh/test/Util/StrTest.php delete mode 100644 app/vendor/psy/psysh/test/VersionUpdater/GitHubCheckerTest.php delete mode 100644 app/vendor/psy/psysh/test/VersionUpdater/NoopCheckerTest.php delete mode 100644 app/vendor/psy/psysh/test/fixtures/config.php delete mode 100644 app/vendor/psy/psysh/test/fixtures/empty.php delete mode 100644 app/vendor/psy/psysh/test/fixtures/mixed/.psysh/psysh_history delete mode 100644 app/vendor/psy/psysh/test/fixtures/mixed/.psysh/rc.php delete mode 100644 app/vendor/psy/psysh/test/fixtures/project/.psysh.php delete mode 100644 app/vendor/psy/psysh/test/fixtures/unvis_fixtures.json delete mode 100755 app/vendor/psy/psysh/test/tools/gen_unvis_fixtures.py delete mode 100755 app/vendor/psy/psysh/test/tools/vis.py delete mode 100644 app/vendor/psy/psysh/vendor-bin/box/composer.json delete mode 100644 app/vendor/psy/psysh/vendor-bin/box/composer.lock create mode 100644 app/vendor/react/promise/CHANGELOG.md create mode 100644 app/vendor/react/promise/LICENSE create mode 100644 app/vendor/react/promise/README.md create mode 100644 app/vendor/react/promise/composer.json create mode 100644 app/vendor/react/promise/src/CancellablePromiseInterface.php create mode 100644 app/vendor/react/promise/src/CancellationQueue.php create mode 100644 app/vendor/react/promise/src/Deferred.php create mode 100644 app/vendor/react/promise/src/Exception/LengthException.php create mode 100644 app/vendor/react/promise/src/ExtendedPromiseInterface.php create mode 100644 app/vendor/react/promise/src/FulfilledPromise.php create mode 100644 app/vendor/react/promise/src/LazyPromise.php create mode 100644 app/vendor/react/promise/src/Promise.php create mode 100644 app/vendor/react/promise/src/PromiseInterface.php create mode 100644 app/vendor/react/promise/src/PromisorInterface.php create mode 100644 app/vendor/react/promise/src/RejectedPromise.php create mode 100644 app/vendor/react/promise/src/UnhandledRejectionException.php create mode 100644 app/vendor/react/promise/src/functions.php create mode 100644 app/vendor/react/promise/src/functions_include.php delete mode 100644 app/vendor/seld/jsonlint/.travis.yml delete mode 100644 app/vendor/seld/jsonlint/phpunit.xml.dist delete mode 100644 app/vendor/seld/jsonlint/tests/JsonParserTest.php delete mode 100644 app/vendor/seld/jsonlint/tests/bom.json delete mode 100644 app/vendor/seld/jsonlint/tests/bootstrap.php create mode 100644 app/vendor/seld/phar-utils/src/Linter.php delete mode 100644 app/vendor/squizlabs/php_codesniffer/.gitattributes delete mode 100644 app/vendor/squizlabs/php_codesniffer/.gitignore delete mode 100644 app/vendor/squizlabs/php_codesniffer/phpcs.xml.dist delete mode 100644 app/vendor/squizlabs/php_codesniffer/scripts/build-phar.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Filters/GitStaged.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/ControlStructures/DisallowYodaConditionsStandard.xml create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/ExecutableFileStandard.xml create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/OneObjectStructurePerFileStandard.xml create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/OneTraitPerFileStandard.xml create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Formatting/SpaceAfterNotStandard.xml create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/NamingConventions/AbstractClassNamePrefixStandard.xml create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/NamingConventions/InterfaceNameSuffixStandard.xml create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/NamingConventions/TraitNameSuffixStandard.xml create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/DisallowRequestSuperglobalStandard.xml create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/WhiteSpace/SpreadOperatorSpacingAfterStandard.xml create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/EmptyPHPStatementSniff.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/ControlStructures/DisallowYodaConditionsSniff.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/ExecutableFileSniff.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Formatting/SpaceBeforeCastSniff.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/NamingConventions/AbstractClassNamePrefixSniff.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/NamingConventions/InterfaceNameSuffixSniff.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/NamingConventions/TraitNameSuffixSniff.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/DisallowRequestSuperglobalSniff.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/RequireStrictTypesSniff.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/VersionControl/GitMergeConflictSniff.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/WhiteSpace/IncrementDecrementSpacingSniff.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/WhiteSpace/SpreadOperatorSpacingAfterSniff.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/EmptyPHPStatementUnitTest.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/EmptyPHPStatementUnitTest.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/EmptyPHPStatementUnitTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Commenting/DocCommentUnitTest.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Commenting/DocCommentUnitTest.js.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/ControlStructures/DisallowYodaConditionsUnitTest.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/ControlStructures/DisallowYodaConditionsUnitTest.php rename app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/ControlStructures/{InlineControlStructureUnitTest.inc => InlineControlStructureUnitTest.1.inc} (95%) rename app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/ControlStructures/{InlineControlStructureUnitTest.inc.fixed => InlineControlStructureUnitTest.1.inc.fixed} (89%) create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/ControlStructures/InlineControlStructureUnitTest.2.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/ControlStructures/InlineControlStructureUnitTest.3.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/ControlStructures/InlineControlStructureUnitTest.4.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/ControlStructures/InlineControlStructureUnitTest.5.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/ControlStructures/InlineControlStructureUnitTest.6.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/ControlStructures/InlineControlStructureUnitTest.7.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Debug/CSSLintUnitTest.css create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Debug/CSSLintUnitTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Debug/ClosureLinterUnitTest.js create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Debug/ClosureLinterUnitTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Debug/ESLintUnitTest.js create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Debug/ESLintUnitTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Debug/JSHintUnitTest.js create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Debug/JSHintUnitTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.3.css.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.3.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.3.js.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.4.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.1.css.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.1.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.1.js.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.2.css.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.2.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.2.js.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.6.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.7.inc rename app/vendor/{psy/psysh/test/fixtures/default/.config/psysh/config.php => squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/ExecutableFileUnitTest.1.inc} (100%) rename app/vendor/{psy/psysh/test/fixtures/legacy/.psysh/rc.php => squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/ExecutableFileUnitTest.2.inc} (100%) mode change 100644 => 100755 create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/ExecutableFileUnitTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/InlineHTMLUnitTest.6.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/InlineHTMLUnitTest.7.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/LineEndingsUnitTest.css.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/LineEndingsUnitTest.js.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Formatting/DisallowMultipleStatementsUnitTest.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Formatting/SpaceBeforeCastUnitTest.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Formatting/SpaceBeforeCastUnitTest.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Formatting/SpaceBeforeCastUnitTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/NamingConventions/AbstractClassNamePrefixUnitTest.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/NamingConventions/AbstractClassNamePrefixUnitTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/NamingConventions/InterfaceNameSuffixUnitTest.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/NamingConventions/InterfaceNameSuffixUnitTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/NamingConventions/TraitNameSuffixUnitTest.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/NamingConventions/TraitNameSuffixUnitTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/CharacterBeforePHPOpeningTagUnitTest.3.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DeprecatedFunctionsUnitTest.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DeprecatedFunctionsUnitTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowRequestSuperglobalUnitTest.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowRequestSuperglobalUnitTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/RequireStrictTypesUnitTest.1.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/RequireStrictTypesUnitTest.2.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/RequireStrictTypesUnitTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.1.css create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.1.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.2.css create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.2.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.3.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.4.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.5.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.6.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.js create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/SubversionPropertiesUnitTest.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/SubversionPropertiesUnitTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/IncrementDecrementSpacingUnitTest.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/IncrementDecrementSpacingUnitTest.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/IncrementDecrementSpacingUnitTest.js create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/IncrementDecrementSpacingUnitTest.js.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/IncrementDecrementSpacingUnitTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.4.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/SpreadOperatorSpacingAfterUnitTest.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/SpreadOperatorSpacingAfterUnitTest.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/SpreadOperatorSpacingAfterUnitTest.php rename app/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Classes/{ClassDeclarationUnitTest.inc => ClassDeclarationUnitTest.1.inc} (64%) create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Classes/ClassDeclarationUnitTest.1.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Classes/ClassDeclarationUnitTest.2.inc rename app/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Commenting/{FileCommentUnitTest.inc => FileCommentUnitTest.1.inc} (96%) create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Commenting/FileCommentUnitTest.2.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Docs/Methods/CamelCapsMethodNameStandard.xml create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.13.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.14.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.15.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.16.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Docs/Functions/NullableTypeDeclarationStandard.xml create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Classes/AnonClassDeclarationSniff.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Classes/ClosingBraceSniff.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/ControlStructures/BooleanOperatorPlacementSniff.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/ControlStructures/ControlStructureSpacingSniff.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Files/DeclareStatementSniff.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Files/FileHeaderSniff.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Files/ImportStatementSniff.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Files/OpenTagSniff.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Functions/NullableTypeDeclarationSniff.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Functions/ReturnTypeDeclarationSniff.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Properties/ConstantVisibilitySniff.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/AnonClassDeclarationUnitTest.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/AnonClassDeclarationUnitTest.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/AnonClassDeclarationUnitTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/ClosingBraceUnitTest.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/ClosingBraceUnitTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/ControlStructures/BooleanOperatorPlacementUnitTest.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/ControlStructures/BooleanOperatorPlacementUnitTest.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/ControlStructures/BooleanOperatorPlacementUnitTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/ControlStructures/ControlStructureSpacingUnitTest.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/ControlStructures/ControlStructureSpacingUnitTest.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/ControlStructures/ControlStructureSpacingUnitTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/DeclareStatementUnitTest.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/DeclareStatementUnitTest.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/DeclareStatementUnitTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.1.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.10.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.10.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.11.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.11.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.12.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.12.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.13.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.14.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.15.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.16.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.17.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.2.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.2.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.3.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.4.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.4.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.5.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.6.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.7.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.7.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.8.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.9.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/ImportStatementUnitTest.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/ImportStatementUnitTest.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/ImportStatementUnitTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/OpenTagUnitTest.1.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/OpenTagUnitTest.2.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/OpenTagUnitTest.2.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/OpenTagUnitTest.3.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/OpenTagUnitTest.4.inc rename app/vendor/{psy/psysh/test/fixtures/mixed/.psysh/config.php => squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/OpenTagUnitTest.5.inc} (100%) create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/OpenTagUnitTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Functions/NullableTypeDeclarationUnitTest.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Functions/NullableTypeDeclarationUnitTest.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Functions/NullableTypeDeclarationUnitTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Functions/ReturnTypeDeclarationUnitTest.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Functions/ReturnTypeDeclarationUnitTest.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Functions/ReturnTypeDeclarationUnitTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Properties/ConstantVisibilityUnitTest.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Properties/ConstantVisibilityUnitTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Traits/UseDeclarationUnitTest.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Traits/UseDeclarationUnitTest.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Traits/UseDeclarationUnitTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Classes/PropertyDeclarationUnitTest.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.5.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.6.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.6.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.7.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.7.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.1.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.10.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.3.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.6.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.7.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.9.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ClassDefinitionClosingBraceSpaceUnitTest.css.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ClassDefinitionOpeningBraceSpaceUnitTest.css.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ColourDefinitionUnitTest.css.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/DisallowMultipleStyleDefinitionsUnitTest.css.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ForbiddenStylesUnitTest.css.fixed rename app/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/{IndentationUnitTest.css => IndentationUnitTest.1.css} (100%) rename app/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/{IndentationUnitTest.css.fixed => IndentationUnitTest.1.css.fixed} (100%) create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/IndentationUnitTest.2.css create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/OpacityUnitTest.css.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/SemicolonSpacingUnitTest.css.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ShorthandSizeUnitTest.css.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/LowercaseClassKeywordsUnitTest.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.1.inc.fixed rename app/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/{FileCommentUnitTest.js => FileCommentUnitTest.1.js.fixed} (78%) create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.2.js create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.4.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.5.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.6.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.7.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/LongConditionClosingCommentUnitTest.js.fixed rename app/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/{PostStatementCommentUnitTest.js => PostStatementCommentUnitTest.1.js} (65%) rename app/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/{PostStatementCommentUnitTest.js.fixed => PostStatementCommentUnitTest.1.js.fixed} (65%) create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/PostStatementCommentUnitTest.2.js create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ElseIfDeclarationUnitTest.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.js.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/LowercaseDeclarationUnitTest.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/SwitchDeclarationUnitTest.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/LowercaseFunctionKeywordsUnitTest.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Objects/ObjectMemberCommaUnitTest.js.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/LowercasePHPFunctionsUnitTest.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/CastSpacingUnitTest.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionOpeningBraceSpaceUnitTest.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionOpeningBraceSpaceUnitTest.js.fixed rename app/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/{FunctionSpacingUnitTest.inc.fixed => FunctionSpacingUnitTest.1.inc} (62%) rename app/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/{FunctionSpacingUnitTest.inc => FunctionSpacingUnitTest.1.inc.fixed} (61%) create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionSpacingUnitTest.2.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionSpacingUnitTest.2.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionSpacingUnitTest.3.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionSpacingUnitTest.3.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionSpacingUnitTest.4.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionSpacingUnitTest.5.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionSpacingUnitTest.5.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionSpacingUnitTest.6.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionSpacingUnitTest.6.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionSpacingUnitTest.7.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/LogicalOperatorSpacingUnitTest.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/LogicalOperatorSpacingUnitTest.js.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.6.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.6.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.7.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.7.inc.fixed create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/AbstractMethodUnitTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/Autoloader/DetermineLoadedClassTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/Autoloader/TestFiles/A.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/Autoloader/TestFiles/B.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/Autoloader/TestFiles/C.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/Autoloader/TestFiles/Sub/C.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/File/FindStartOfStatementTest.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/File/FindStartOfStatementTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/Filters/Filter/AcceptTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/Filters/Filter/AcceptTest.xml create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/RuleInclusionAbsoluteLinuxTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/RuleInclusionAbsoluteLinuxTest.xml create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/RuleInclusionAbsoluteWindowsTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/RuleInclusionAbsoluteWindowsTest.xml create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/RuleInclusionTest-include.xml create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/RuleInclusionTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/RuleInclusionTest.xml create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/Sniffs/AbstractArraySniffTest.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/Sniffs/AbstractArraySniffTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/Sniffs/AbstractArraySniffTestable.php create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/AnonClassParenthesisOwnerTest.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/AnonClassParenthesisOwnerTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/AttributesTest.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/AttributesTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/BackfillFnTokenTest.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/BackfillFnTokenTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/BackfillMatchTokenTest.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/BackfillMatchTokenTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/BackfillNumericSeparatorTest.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/BackfillNumericSeparatorTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/BitwiseOrTest.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/BitwiseOrTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/DefaultKeywordTest.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/DefaultKeywordTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/DoubleArrowTest.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/DoubleArrowTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/GotoLabelTest.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/GotoLabelTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/NamedFunctionCallArgumentsTest.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/NamedFunctionCallArgumentsTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/NullsafeObjectOperatorTest.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/NullsafeObjectOperatorTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/ScopeSettingWithNamespaceOperatorTest.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/ScopeSettingWithNamespaceOperatorTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/ShortArrayTest.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/ShortArrayTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/StableCommentWhitespaceTest.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/StableCommentWhitespaceTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/StableCommentWhitespaceWinTest.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/StableCommentWhitespaceWinTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/UndoNamespacedNameSingleTokenTest.inc create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/UndoNamespacedNameSingleTokenTest.php create mode 100644 app/vendor/squizlabs/php_codesniffer/tests/FileList.php create mode 100644 app/vendor/symfony/config/Tests/Fixtures/BadFileName.php create mode 100644 app/vendor/symfony/config/Tests/Fixtures/ParseError.php rename app/vendor/{psy/psysh/test/fixtures/legacy/.psysh/history => symfony/config/Tests/Fixtures/Util/not_readable.xml} (100%) create mode 100644 app/vendor/symfony/console/Tests/Descriptor/ApplicationDescriptionTest.php rename app/vendor/symfony/console/Tests/Fixtures/{TestTiti.php => FooHiddenCommand.php} (67%) create mode 100644 app/vendor/symfony/console/Tests/Fixtures/TestAmbiguousCommandRegistering.php rename app/vendor/symfony/console/Tests/Fixtures/{TestToto.php => TestAmbiguousCommandRegistering2.php} (62%) rename app/vendor/{psy/psysh/test/fixtures/legacy/.psysh/php_manual.sqlite => symfony/console/Tests/Fixtures/stream_output_file.txt} (100%) create mode 100644 app/vendor/symfony/console/Tests/Question/ChoiceQuestionTest.php create mode 100644 app/vendor/symfony/console/Tests/Question/ConfirmationQuestionTest.php delete mode 100644 app/vendor/symfony/debug/.gitignore delete mode 100644 app/vendor/symfony/debug/Exception/ContextErrorException.php delete mode 100644 app/vendor/symfony/debug/Resources/ext/README.md delete mode 100644 app/vendor/symfony/debug/Resources/ext/config.m4 delete mode 100644 app/vendor/symfony/debug/Resources/ext/config.w32 delete mode 100644 app/vendor/symfony/debug/Resources/ext/php_symfony_debug.h delete mode 100644 app/vendor/symfony/debug/Resources/ext/symfony_debug.c delete mode 100644 app/vendor/symfony/debug/Resources/ext/tests/001.phpt delete mode 100644 app/vendor/symfony/debug/Resources/ext/tests/002.phpt delete mode 100644 app/vendor/symfony/debug/Resources/ext/tests/002_1.phpt delete mode 100644 app/vendor/symfony/debug/Resources/ext/tests/003.phpt delete mode 100644 app/vendor/symfony/debug/Tests/DebugClassLoaderTest.php delete mode 100644 app/vendor/symfony/debug/Tests/ErrorHandlerTest.php delete mode 100644 app/vendor/symfony/debug/Tests/Exception/FlattenExceptionTest.php delete mode 100644 app/vendor/symfony/debug/Tests/ExceptionHandlerTest.php delete mode 100644 app/vendor/symfony/debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php delete mode 100644 app/vendor/symfony/debug/Tests/FatalErrorHandler/UndefinedFunctionFatalErrorHandlerTest.php delete mode 100644 app/vendor/symfony/debug/Tests/FatalErrorHandler/UndefinedMethodFatalErrorHandlerTest.php delete mode 100644 app/vendor/symfony/debug/Tests/Fixtures/AnnotatedClass.php delete mode 100644 app/vendor/symfony/debug/Tests/Fixtures/ClassAlias.php delete mode 100644 app/vendor/symfony/debug/Tests/Fixtures/DeprecatedClass.php delete mode 100644 app/vendor/symfony/debug/Tests/Fixtures/DeprecatedInterface.php delete mode 100644 app/vendor/symfony/debug/Tests/Fixtures/ExtendedFinalMethod.php delete mode 100644 app/vendor/symfony/debug/Tests/Fixtures/FinalClass.php delete mode 100644 app/vendor/symfony/debug/Tests/Fixtures/FinalMethod.php delete mode 100644 app/vendor/symfony/debug/Tests/Fixtures/FinalMethod2Trait.php delete mode 100644 app/vendor/symfony/debug/Tests/Fixtures/InternalClass.php delete mode 100644 app/vendor/symfony/debug/Tests/Fixtures/InternalInterface.php delete mode 100644 app/vendor/symfony/debug/Tests/Fixtures/InternalTrait.php delete mode 100644 app/vendor/symfony/debug/Tests/Fixtures/InternalTrait2.php delete mode 100644 app/vendor/symfony/debug/Tests/Fixtures/NonDeprecatedInterface.php delete mode 100644 app/vendor/symfony/debug/Tests/Fixtures/PEARClass.php delete mode 100644 app/vendor/symfony/debug/Tests/Fixtures/Throwing.php delete mode 100644 app/vendor/symfony/debug/Tests/Fixtures/ToStringThrower.php delete mode 100644 app/vendor/symfony/debug/Tests/Fixtures/TraitWithInternalMethod.php delete mode 100644 app/vendor/symfony/debug/Tests/Fixtures/casemismatch.php delete mode 100644 app/vendor/symfony/debug/Tests/Fixtures/notPsr0Bis.php delete mode 100644 app/vendor/symfony/debug/Tests/Fixtures/psr4/Psr4CaseMismatch.php delete mode 100644 app/vendor/symfony/debug/Tests/Fixtures/reallyNotPsr0.php delete mode 100644 app/vendor/symfony/debug/Tests/Fixtures2/RequiredTwice.php delete mode 100644 app/vendor/symfony/debug/Tests/HeaderMock.php delete mode 100644 app/vendor/symfony/debug/Tests/phpt/debug_class_loader.phpt delete mode 100644 app/vendor/symfony/debug/Tests/phpt/decorate_exception_hander.phpt delete mode 100644 app/vendor/symfony/debug/Tests/phpt/exception_rethrown.phpt delete mode 100644 app/vendor/symfony/debug/Tests/phpt/fatal_with_nested_handlers.phpt delete mode 100644 app/vendor/symfony/debug/phpunit.xml.dist delete mode 100644 app/vendor/symfony/filesystem/.gitignore rename app/vendor/symfony/{debug/Tests/MockExceptionHandler.php => filesystem/Exception/InvalidArgumentException.php} (51%) delete mode 100644 app/vendor/symfony/filesystem/LockHandler.php delete mode 100644 app/vendor/symfony/filesystem/Tests/ExceptionTest.php delete mode 100644 app/vendor/symfony/filesystem/Tests/FilesystemTest.php delete mode 100644 app/vendor/symfony/filesystem/Tests/FilesystemTestCase.php delete mode 100644 app/vendor/symfony/filesystem/Tests/Fixtures/MockStream/MockStream.php delete mode 100644 app/vendor/symfony/filesystem/Tests/LockHandlerTest.php delete mode 100644 app/vendor/symfony/filesystem/phpunit.xml.dist delete mode 100644 app/vendor/symfony/finder/.gitignore rename app/vendor/symfony/{process/Tests/SignalListener.php => finder/Exception/DirectoryNotFoundException.php} (57%) delete mode 100644 app/vendor/symfony/finder/Exception/ExceptionInterface.php create mode 100644 app/vendor/symfony/finder/Gitignore.php delete mode 100644 app/vendor/symfony/finder/Iterator/FilterIterator.php create mode 100644 app/vendor/symfony/finder/Iterator/LazyIterator.php delete mode 100644 app/vendor/symfony/finder/Tests/Comparator/ComparatorTest.php delete mode 100644 app/vendor/symfony/finder/Tests/Comparator/DateComparatorTest.php delete mode 100644 app/vendor/symfony/finder/Tests/Comparator/NumberComparatorTest.php delete mode 100644 app/vendor/symfony/finder/Tests/FinderTest.php delete mode 100644 app/vendor/symfony/finder/Tests/Fixtures/.dot/a delete mode 100644 app/vendor/symfony/finder/Tests/Fixtures/.dot/b/c.neon delete mode 100644 app/vendor/symfony/finder/Tests/Fixtures/.dot/b/d.neon delete mode 100644 app/vendor/symfony/finder/Tests/Fixtures/A/B/C/abc.dat delete mode 100644 app/vendor/symfony/finder/Tests/Fixtures/A/B/ab.dat delete mode 100644 app/vendor/symfony/finder/Tests/Fixtures/A/a.dat delete mode 100644 app/vendor/symfony/finder/Tests/Fixtures/copy/A/B/C/abc.dat.copy delete mode 100644 app/vendor/symfony/finder/Tests/Fixtures/copy/A/B/ab.dat.copy delete mode 100644 app/vendor/symfony/finder/Tests/Fixtures/copy/A/a.dat.copy delete mode 100644 app/vendor/symfony/finder/Tests/Fixtures/dolor.txt delete mode 100644 app/vendor/symfony/finder/Tests/Fixtures/ipsum.txt delete mode 100644 app/vendor/symfony/finder/Tests/Fixtures/lorem.txt delete mode 100644 app/vendor/symfony/finder/Tests/Fixtures/one/.dot delete mode 100644 app/vendor/symfony/finder/Tests/Fixtures/one/a delete mode 100644 app/vendor/symfony/finder/Tests/Fixtures/one/b/c.neon delete mode 100644 app/vendor/symfony/finder/Tests/Fixtures/one/b/d.neon delete mode 100644 app/vendor/symfony/finder/Tests/Fixtures/r+e.gex[c]a(r)s/dir/bar.dat delete mode 100644 app/vendor/symfony/finder/Tests/Fixtures/with space/foo.txt delete mode 100644 app/vendor/symfony/finder/Tests/GlobTest.php delete mode 100644 app/vendor/symfony/finder/Tests/Iterator/CustomFilterIteratorTest.php delete mode 100644 app/vendor/symfony/finder/Tests/Iterator/DateRangeFilterIteratorTest.php delete mode 100644 app/vendor/symfony/finder/Tests/Iterator/DepthRangeFilterIteratorTest.php delete mode 100644 app/vendor/symfony/finder/Tests/Iterator/ExcludeDirectoryFilterIteratorTest.php delete mode 100644 app/vendor/symfony/finder/Tests/Iterator/FileTypeFilterIteratorTest.php delete mode 100644 app/vendor/symfony/finder/Tests/Iterator/FilecontentFilterIteratorTest.php delete mode 100644 app/vendor/symfony/finder/Tests/Iterator/FilenameFilterIteratorTest.php delete mode 100644 app/vendor/symfony/finder/Tests/Iterator/FilterIteratorTest.php delete mode 100644 app/vendor/symfony/finder/Tests/Iterator/Iterator.php delete mode 100644 app/vendor/symfony/finder/Tests/Iterator/IteratorTestCase.php delete mode 100644 app/vendor/symfony/finder/Tests/Iterator/MockFileListIterator.php delete mode 100644 app/vendor/symfony/finder/Tests/Iterator/MockSplFileInfo.php delete mode 100644 app/vendor/symfony/finder/Tests/Iterator/MultiplePcreFilterIteratorTest.php delete mode 100644 app/vendor/symfony/finder/Tests/Iterator/PathFilterIteratorTest.php delete mode 100644 app/vendor/symfony/finder/Tests/Iterator/RealIteratorTestCase.php delete mode 100644 app/vendor/symfony/finder/Tests/Iterator/RecursiveDirectoryIteratorTest.php delete mode 100644 app/vendor/symfony/finder/Tests/Iterator/SizeRangeFilterIteratorTest.php delete mode 100644 app/vendor/symfony/finder/Tests/Iterator/SortableIteratorTest.php delete mode 100644 app/vendor/symfony/finder/phpunit.xml.dist create mode 100644 app/vendor/symfony/polyfill-ctype/bootstrap80.php create mode 100644 app/vendor/symfony/polyfill-mbstring/bootstrap80.php create mode 100644 app/vendor/symfony/polyfill-php72/LICENSE create mode 100644 app/vendor/symfony/polyfill-php72/Php72.php create mode 100644 app/vendor/symfony/polyfill-php72/README.md create mode 100644 app/vendor/symfony/polyfill-php72/bootstrap.php create mode 100644 app/vendor/symfony/polyfill-php72/composer.json rename app/vendor/{dnoegel/php-xdg-base-dir => symfony/polyfill-php80}/LICENSE (84%) create mode 100644 app/vendor/symfony/polyfill-php80/Php80.php create mode 100644 app/vendor/symfony/polyfill-php80/README.md create mode 100644 app/vendor/symfony/polyfill-php80/Resources/stubs/Attribute.php create mode 100644 app/vendor/symfony/polyfill-php80/Resources/stubs/Stringable.php create mode 100644 app/vendor/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php create mode 100644 app/vendor/symfony/polyfill-php80/Resources/stubs/ValueError.php create mode 100644 app/vendor/symfony/polyfill-php80/bootstrap.php create mode 100644 app/vendor/symfony/polyfill-php80/composer.json delete mode 100644 app/vendor/symfony/process/.gitignore create mode 100644 app/vendor/symfony/process/Exception/ProcessSignaledException.php delete mode 100644 app/vendor/symfony/process/ProcessBuilder.php delete mode 100644 app/vendor/symfony/process/Tests/ExecutableFinderTest.php delete mode 100644 app/vendor/symfony/process/Tests/NonStopableProcess.php delete mode 100644 app/vendor/symfony/process/Tests/PhpExecutableFinderTest.php delete mode 100644 app/vendor/symfony/process/Tests/PhpProcessTest.php delete mode 100644 app/vendor/symfony/process/Tests/PipeStdinInStdoutStdErrStreamSelect.php delete mode 100644 app/vendor/symfony/process/Tests/ProcessBuilderTest.php delete mode 100644 app/vendor/symfony/process/Tests/ProcessFailedExceptionTest.php delete mode 100644 app/vendor/symfony/process/Tests/ProcessTest.php delete mode 100644 app/vendor/symfony/process/Tests/ProcessUtilsTest.php delete mode 100644 app/vendor/symfony/process/phpunit.xml.dist delete mode 100644 app/vendor/symfony/var-dumper/.gitignore create mode 100644 app/vendor/symfony/var-dumper/Caster/DsCaster.php create mode 100644 app/vendor/symfony/var-dumper/Caster/DsPairStub.php create mode 100644 app/vendor/symfony/var-dumper/Caster/GmpCaster.php create mode 100644 app/vendor/symfony/var-dumper/Caster/ImagineCaster.php create mode 100644 app/vendor/symfony/var-dumper/Caster/ImgStub.php create mode 100644 app/vendor/symfony/var-dumper/Caster/IntlCaster.php create mode 100644 app/vendor/symfony/var-dumper/Caster/MemcachedCaster.php delete mode 100644 app/vendor/symfony/var-dumper/Caster/MongoCaster.php create mode 100644 app/vendor/symfony/var-dumper/Caster/ProxyManagerCaster.php create mode 100644 app/vendor/symfony/var-dumper/Caster/UuidCaster.php create mode 100644 app/vendor/symfony/var-dumper/Command/Descriptor/CliDescriptor.php create mode 100644 app/vendor/symfony/var-dumper/Command/Descriptor/DumpDescriptorInterface.php create mode 100644 app/vendor/symfony/var-dumper/Command/Descriptor/HtmlDescriptor.php create mode 100644 app/vendor/symfony/var-dumper/Command/ServerDumpCommand.php create mode 100644 app/vendor/symfony/var-dumper/Dumper/ContextProvider/CliContextProvider.php create mode 100644 app/vendor/symfony/var-dumper/Dumper/ContextProvider/ContextProviderInterface.php create mode 100644 app/vendor/symfony/var-dumper/Dumper/ContextProvider/RequestContextProvider.php create mode 100644 app/vendor/symfony/var-dumper/Dumper/ContextProvider/SourceContextProvider.php create mode 100644 app/vendor/symfony/var-dumper/Dumper/ContextualizedDumper.php create mode 100644 app/vendor/symfony/var-dumper/Dumper/ServerDumper.php create mode 100755 app/vendor/symfony/var-dumper/Resources/bin/var-dump-server create mode 100644 app/vendor/symfony/var-dumper/Resources/css/htmlDescriptor.css create mode 100644 app/vendor/symfony/var-dumper/Resources/js/htmlDescriptor.js create mode 100644 app/vendor/symfony/var-dumper/Server/Connection.php create mode 100644 app/vendor/symfony/var-dumper/Server/DumpServer.php delete mode 100644 app/vendor/symfony/var-dumper/Tests/Caster/CasterTest.php delete mode 100644 app/vendor/symfony/var-dumper/Tests/Caster/DateCasterTest.php delete mode 100644 app/vendor/symfony/var-dumper/Tests/Caster/ExceptionCasterTest.php delete mode 100644 app/vendor/symfony/var-dumper/Tests/Caster/PdoCasterTest.php delete mode 100644 app/vendor/symfony/var-dumper/Tests/Caster/RedisCasterTest.php delete mode 100644 app/vendor/symfony/var-dumper/Tests/Caster/ReflectionCasterTest.php delete mode 100644 app/vendor/symfony/var-dumper/Tests/Caster/SplCasterTest.php delete mode 100644 app/vendor/symfony/var-dumper/Tests/Caster/StubCasterTest.php delete mode 100644 app/vendor/symfony/var-dumper/Tests/Caster/XmlReaderCasterTest.php delete mode 100644 app/vendor/symfony/var-dumper/Tests/Cloner/DataTest.php delete mode 100644 app/vendor/symfony/var-dumper/Tests/Cloner/VarClonerTest.php delete mode 100644 app/vendor/symfony/var-dumper/Tests/Dumper/CliDumperTest.php delete mode 100644 app/vendor/symfony/var-dumper/Tests/Dumper/FunctionsTest.php delete mode 100644 app/vendor/symfony/var-dumper/Tests/Dumper/HtmlDumperTest.php delete mode 100644 app/vendor/symfony/var-dumper/Tests/Fixtures/FooInterface.php delete mode 100644 app/vendor/symfony/var-dumper/Tests/Fixtures/GeneratorDemo.php delete mode 100644 app/vendor/symfony/var-dumper/Tests/Fixtures/NotLoadableClass.php delete mode 100644 app/vendor/symfony/var-dumper/Tests/Fixtures/Twig.php delete mode 100644 app/vendor/symfony/var-dumper/Tests/Fixtures/dumb-var.php delete mode 100644 app/vendor/symfony/var-dumper/Tests/Fixtures/xml_reader.xml delete mode 100644 app/vendor/symfony/var-dumper/Tests/Test/VarDumperTestTraitTest.php delete mode 100644 app/vendor/symfony/var-dumper/phpunit.xml.dist create mode 100644 app/vendor/symfony/yaml/Tests/Fixtures/multiple_lines_as_literal_block_for_tagged_values.yml create mode 100644 app/vendor/twig/twig/.gitattributes create mode 100644 app/vendor/twig/twig/.github/workflows/ci.yml create mode 100644 app/vendor/twig/twig/.github/workflows/documentation.yml create mode 100644 app/vendor/twig/twig/.php-cs-fixer.dist.php delete mode 100644 app/vendor/twig/twig/.php_cs.dist delete mode 100644 app/vendor/twig/twig/.travis.yml create mode 100644 app/vendor/twig/twig/doc/.doctor-rst.yaml create mode 100644 app/vendor/twig/twig/doc/_build/.requirements.txt create mode 100644 app/vendor/twig/twig/doc/_build/Makefile create mode 100644 app/vendor/twig/twig/doc/_build/conf.py delete mode 100644 app/vendor/twig/twig/doc/advanced_legacy.rst create mode 100644 app/vendor/twig/twig/doc/filters/filter.rst create mode 100644 app/vendor/twig/twig/doc/filters/map.rst create mode 100644 app/vendor/twig/twig/doc/filters/reduce.rst create mode 100644 app/vendor/twig/twig/doc/filters/spaceless.rst create mode 100644 app/vendor/twig/twig/doc/tags/apply.rst create mode 100644 app/vendor/twig/twig/doc/tags/deprecated.rst delete mode 100644 app/vendor/twig/twig/ext/twig/.gitignore delete mode 100644 app/vendor/twig/twig/ext/twig/config.m4 delete mode 100644 app/vendor/twig/twig/ext/twig/config.w32 delete mode 100644 app/vendor/twig/twig/ext/twig/php_twig.h delete mode 100644 app/vendor/twig/twig/ext/twig/twig.c create mode 100644 app/vendor/twig/twig/lib/Twig/Node/Deprecated.php create mode 100644 app/vendor/twig/twig/lib/Twig/TokenParser/Deprecated.php delete mode 100644 app/vendor/twig/twig/phpunit.xml.dist create mode 100644 app/vendor/twig/twig/src/Node/CheckSecurityCallNode.php create mode 100644 app/vendor/twig/twig/src/Node/CheckToStringNode.php create mode 100644 app/vendor/twig/twig/src/Node/DeprecatedNode.php create mode 100644 app/vendor/twig/twig/src/Node/Expression/ArrowFunctionExpression.php create mode 100644 app/vendor/twig/twig/src/Node/Expression/InlinePrint.php create mode 100644 app/vendor/twig/twig/src/TokenParser/ApplyTokenParser.php create mode 100644 app/vendor/twig/twig/src/TokenParser/DeprecatedTokenParser.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/AutoloaderTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Cache/FilesystemTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/CompilerTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/ContainerRuntimeLoaderTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/CustomExtensionTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/EnvironmentTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/ErrorTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/ExpressionParserTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Extension/CoreTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Extension/SandboxTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/FactoryRuntimeLoaderTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/FileCachingTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/FileExtensionEscapingStrategyTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/FilesystemHelper.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/autoescape/block.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/autoescape/name.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/errors/base.html delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/errors/index.html delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/child_contents_outside_blocks.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/multiline_array_with_undefined_variable.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/multiline_array_with_undefined_variable_again.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/multiline_function_with_undefined_variable.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/multiline_function_with_unknown_argument.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/multiline_tag_with_undefined_variable.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/strict_comparison_operator.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/syntax_error_in_reused_template.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/unclosed_tag.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/undefined_parent.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/undefined_template_in_child_template.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/undefined_trait.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/_self.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/array.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/array_call.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/binary.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/bitwise.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/comparison.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/divisibleby.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/dotdot.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/ends_with.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/grouping.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/literals.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/magic_call.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/matches.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/method_call.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/negative_numbers.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/operators_as_variables.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/postfix.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/power.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/sameas.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/starts_with.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/strings.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/ternary_operator.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/ternary_operator_noelse.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/ternary_operator_nothen.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/two_word_operators_as_variables.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/unary.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/unary_macro_arguments.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/unary_precedence.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/abs.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_float.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_empty_fill.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_exact_elements.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_fill.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_keys.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_zero_elements.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/convert_encoding.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_default_format.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_default_format_interval.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_immutable.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_interval.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_modify.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_namedargs.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/default.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/dynamic_filter.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/escape.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/escape_html_attr.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/escape_javascript.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/escape_non_supported_charset.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/first.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/force_escape.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/format.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/join.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/json_encode.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/last.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/length.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/length_utf8.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/merge.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/nl2br.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/number_format.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/number_format_default.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/replace.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/replace_invalid_arg.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/reverse.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/round.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/slice.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/sort.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/special_chars.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/split.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/split_utf8.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/static_calls.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/trim.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/urlencode.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/urlencode_deprecated.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/attribute.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/block.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/block_with_template.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/block_without_name.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/constant.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/cycle.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/date.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/date_namedargs.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/dump.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/dump_array.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/dynamic_function.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/assignment.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/autoescaping.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/basic.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/expression.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/ignore_missing.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/missing.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/missing_nested.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/sandbox.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/sandbox_disabling.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/sandbox_disabling_ignore_missing.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/template_instance.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/templates_as_array.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/with_context.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/with_variables.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/magic_call.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/magic_call53.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/max.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/min.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/range.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/recursive_block_with_inheritance.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/source.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/special_chars.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/static_calls.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/template_from_string.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/default_values.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/nested_calls.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/reserved_variables.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/simple.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/varargs.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/varargs_argument.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/with_filters.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/block_names_unicity.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/combined_debug_info.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/empty_token.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/issue_1143.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/multi_word_tests.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/simple_xml_element.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/strings_like_numbers.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/basic.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/blocks.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/double_escaping.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/functions.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/literal.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/nested.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/objects.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/raw.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/strategy.legacy.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/strategy.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/type.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/with_filters.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/with_filters_arguments.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/with_pre_escape_filters.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/with_preserves_safety_filters.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/block/basic.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/block/block_unique_name.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/block/special_chars.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/basic.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/complex_dynamic_parent.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/dynamic_parent.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/error_line.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/multiple.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/nested.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/with_extends.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/basic.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/json_encode.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/multiple.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/nested.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/with_for_tag.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/with_if_tag.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/condition.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/context.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/else.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/inner_variables.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/keys.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/keys_and_values.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/loop_context.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/loop_context_local.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/loop_not_defined.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/loop_not_defined_cond.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/nested_else.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/objects.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/objects_countable.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/recursive.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/values.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/from.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/if/basic.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/if/expression.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/basic.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/expression.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/ignore_missing.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/missing.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/missing_nested.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/only.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/template_instance.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/templates_as_array.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/with_variables.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/basic.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/block_expr.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/block_expr2.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/conditional.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/dynamic.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/empty.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/extends_as_array.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/extends_as_array_with_empty_name.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/extends_as_array_with_null_name.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/multiple.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/multiple_dynamic.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/nested_blocks.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/nested_blocks_parent_only.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/nested_inheritance.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_change.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_in_a_block.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_isolation.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_nested.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_without_extends.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_without_extends_but_traits.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/template_instance.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/use.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/basic.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/endmacro_name.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/external.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/from.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/from_with_reserved_name.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/global.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/import_with_reserved_nam.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/reserved_name.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/self_import.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/special_chars.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/super_globals.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/raw/basic.legacy.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/raw/mixed_usage_with_raw.legacy.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/raw/whitespace_control.legacy.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/sandbox/not_valid1.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/sandbox/not_valid2.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/sandbox/simple.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/set/basic.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/set/capture-empty.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/set/capture.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/set/expression.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/spaceless/simple.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/special_chars.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/trim_block.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/aliases.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/basic.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/deep.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/deep_empty.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/inheritance.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/inheritance2.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/multiple.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/multiple_aliases.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/parent_block.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/parent_block2.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/parent_block3.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/use_with_parent.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/verbatim/basic.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/verbatim/mixed_usage_with_raw.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/verbatim/whitespace_control.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/with/basic.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/with/expression.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/with/nested.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/with/with_no_hash.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/with/with_only.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/array.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/constant.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/defined.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/defined_for_attribute.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/defined_for_blocks.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/defined_for_blocks_with_template.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/defined_for_constants.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/empty.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/even.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/in.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/in_with_objects.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/iterable.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/null_coalesce.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/odd.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/IntegrationTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/LegacyFixtures/autoescape/filename.legacy.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/LegacyFixtures/functions/undefined_block.legacy.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/LegacyFixtures/test.legacy.test delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/LegacyIntegrationTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/LexerTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Loader/ArrayTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Loader/ChainTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Loader/FilesystemTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/inheritance/array_inheritance_empty_parent.html.twig delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/inheritance/array_inheritance_nonexistent_parent.html.twig delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/inheritance/array_inheritance_null_parent.html.twig delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/inheritance/array_inheritance_valid_parent.html.twig delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/inheritance/parent.html.twig delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/inheritance/spare_parent.html.twig delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/named/index.html delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/named_bis/index.html delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/named_final/index.html delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/named_quater/named_absolute.html delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/named_ter/index.html delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/normal/index.html delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/normal_bis/index.html delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/normal_final/index.html delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/normal_ter/index.html delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/phar/phar-sample.phar delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/themes/theme1/blocks.html.twig delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/themes/theme2/blocks.html.twig delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/NativeExtensionTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Node/AutoEscapeTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Node/BlockReferenceTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Node/BlockTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Node/DoTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Node/Expression/ArrayTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Node/Expression/AssignNameTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/AddTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/AndTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/ConcatTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/DivTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/FloorDivTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/ModTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/MulTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/OrTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/SubTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Node/Expression/CallTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Node/Expression/ConditionalTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Node/Expression/ConstantTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Node/Expression/FilterTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Node/Expression/FunctionTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Node/Expression/GetAttrTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Node/Expression/NameTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Node/Expression/NullCoalesceTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Node/Expression/PHP53/FilterInclude.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Node/Expression/PHP53/FunctionInclude.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Node/Expression/PHP53/TestInclude.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Node/Expression/ParentTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Node/Expression/TestTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Node/Expression/Unary/NegTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Node/Expression/Unary/NotTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Node/Expression/Unary/PosTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Node/ForTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Node/IfTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Node/ImportTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Node/IncludeTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Node/MacroTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Node/ModuleTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Node/PrintTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Node/SandboxTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Node/SandboxedPrintTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Node/SetTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Node/SpacelessTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Node/TextTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/NodeVisitor/OptimizerTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/ParserTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Profiler/Dumper/AbstractTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Profiler/Dumper/BlackfireTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Profiler/Dumper/HtmlTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Profiler/Dumper/TextTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Profiler/ProfileTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/TemplateTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/TemplateWrapperTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/TokenStreamTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/Util/DeprecationCollectorTest.php delete mode 100644 app/vendor/twig/twig/test/Twig/Tests/escapingTest.php delete mode 100644 app/vendor/zendframework/zend-diactoros/.coveralls.yml delete mode 100644 app/vendor/zendframework/zend-diactoros/CONDUCT.md delete mode 100644 app/vendor/zendframework/zend-diactoros/CONTRIBUTING.md delete mode 100644 app/vendor/zendframework/zend-diactoros/LICENSE.md delete mode 100644 app/vendor/zendframework/zend-diactoros/README.md delete mode 100644 app/vendor/zendframework/zend-diactoros/composer.json delete mode 100644 app/vendor/zendframework/zend-diactoros/composer.lock delete mode 100644 app/vendor/zendframework/zend-diactoros/mkdocs.yml delete mode 100644 app/vendor/zendframework/zend-diactoros/src/Exception/DeprecatedMethodException.php delete mode 100644 app/vendor/zendframework/zend-diactoros/src/Exception/ExceptionInterface.php delete mode 100644 app/vendor/zendframework/zend-diactoros/src/functions/marshal_method_from_sapi.php diff --git a/app/composer.json b/app/composer.json index 2a74610e9..97b9d5208 100644 --- a/app/composer.json +++ b/app/composer.json @@ -7,7 +7,7 @@ "require": { "php": ">=5.6", "adodb/adodb-php": "^5.20", - "cakephp/cakephp": "3.8.*", + "cakephp/cakephp": "3.10.*", "cakephp/migrations": "^1.0", "cakephp/plugin-installer": "^1.0", "doctrine/dbal": "^2.9", diff --git a/app/composer.lock b/app/composer.lock index fd9031f48..a107ccd9f 100644 --- a/app/composer.lock +++ b/app/composer.lock @@ -1,27 +1,30 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "8eba2ba5dae15d770db8f39b29644d0a", + "content-hash": "18bc2276e368023a5a640a707d6102dc", "packages": [ { "name": "adodb/adodb-php", - "version": "v5.20.13", + "version": "v5.21.2", "source": { "type": "git", "url": "https://github.com/ADOdb/ADOdb.git", - "reference": "1141326db4b5092cee95841a1c056f876b9b4c83" + "reference": "aa161c28dfffcab13a3cb9bd407917573987f0f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ADOdb/ADOdb/zipball/1141326db4b5092cee95841a1c056f876b9b4c83", - "reference": "1141326db4b5092cee95841a1c056f876b9b4c83", + "url": "https://api.github.com/repos/ADOdb/ADOdb/zipball/aa161c28dfffcab13a3cb9bd407917573987f0f6", + "reference": "aa161c28dfffcab13a3cb9bd407917573987f0f6", "shasum": "" }, "require": { - "php": ">=5.3.2" + "php": "^5.5.9 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^8.5" }, "type": "library", "autoload": { @@ -50,7 +53,7 @@ } ], "description": "ADOdb is a PHP database abstraction layer library", - "homepage": "http://adodb.org/", + "homepage": "https://adodb.org/", "keywords": [ "abstraction", "database", @@ -58,7 +61,11 @@ "library", "php" ], - "time": "2018-08-06T16:04:33+00:00" + "support": { + "issues": "https://github.com/ADOdb/ADOdb/issues", + "source": "https://github.com/ADOdb/ADOdb" + }, + "time": "2021-08-22T10:49:44+00:00" }, { "name": "aura/intl", @@ -104,20 +111,24 @@ "l10n", "localization" ], + "support": { + "issues": "https://github.com/auraphp/Aura.Intl/issues", + "source": "https://github.com/auraphp/Aura.Intl/tree/3.x" + }, "time": "2017-01-20T05:00:11+00:00" }, { "name": "cakephp/cakephp", - "version": "3.8.3", + "version": "3.10.0", "source": { "type": "git", "url": "https://github.com/cakephp/cakephp.git", - "reference": "705b43b70e87ec226a6b37099013de1003a17c17" + "reference": "084963bd27984e50174fadcbdee91048112231a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cakephp/cakephp/zipball/705b43b70e87ec226a6b37099013de1003a17c17", - "reference": "705b43b70e87ec226a6b37099013de1003a17c17", + "url": "https://api.github.com/repos/cakephp/cakephp/zipball/084963bd27984e50174fadcbdee91048112231a0", + "reference": "084963bd27984e50174fadcbdee91048112231a0", "shasum": "" }, "require": { @@ -125,10 +136,11 @@ "cakephp/chronos": "^1.0.1", "ext-intl": "*", "ext-mbstring": "*", - "php": ">=5.6.0", + "laminas/laminas-diactoros": "^1.4.0", + "paragonie/random_compat": "^1.4|^2.0|9.99.99", + "php": ">=5.6.0,<8.0.0", "psr/log": "^1.0.0", - "psr/simple-cache": "^1.0.0", - "zendframework/zend-diactoros": "^1.4.0" + "psr/simple-cache": "^1.0.0" }, "conflict": { "phpunit/phpunit": "<5.7" @@ -151,12 +163,14 @@ "require-dev": { "cakephp/cakephp-codesniffer": "^3.0", "cakephp/chronos": "^1.2.1", + "paragonie/csp-builder": "^1.4|^2.3", "phpunit/phpunit": "^5.7.14|^6.0" }, "suggest": { "ext-curl": "To enable more efficient network calls in Http\\Client.", "ext-openssl": "To use Security::encrypt() or have secure CSRF token generation.", - "lib-ICU": "The intl PHP library, to use Text::transliterate() or Text::slug()" + "lib-ICU": "The intl PHP library, to use Text::transliterate() or Text::slug()", + "paragonie/csp-builder": "CSP builder, to use the CSP Middleware" }, "type": "library", "autoload": { @@ -193,30 +207,35 @@ "rapid-development", "validation" ], - "time": "2019-08-31T02:05:56+00:00" + "support": { + "forum": "https://stackoverflow.com/tags/cakephp", + "irc": "irc://irc.freenode.org/cakephp", + "issues": "https://github.com/cakephp/cakephp/issues", + "source": "https://github.com/cakephp/cakephp" + }, + "time": "2021-06-20T01:14:53+00:00" }, { "name": "cakephp/chronos", - "version": "1.2.8", + "version": "1.3.0", "source": { "type": "git", "url": "https://github.com/cakephp/chronos.git", - "reference": "0292f06e8cc23fc82f0574889da2d8bf27b613c1" + "reference": "ba2bab98849e7bf29b02dd634ada49ab36472959" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cakephp/chronos/zipball/0292f06e8cc23fc82f0574889da2d8bf27b613c1", - "reference": "0292f06e8cc23fc82f0574889da2d8bf27b613c1", + "url": "https://api.github.com/repos/cakephp/chronos/zipball/ba2bab98849e7bf29b02dd634ada49ab36472959", + "reference": "ba2bab98849e7bf29b02dd634ada49ab36472959", "shasum": "" }, "require": { - "php": "^5.5.9|^7" + "php": ">=5.6" }, "require-dev": { "athletic/athletic": "~0.1", "cakephp/cakephp-codesniffer": "^3.0", "phpbench/phpbench": "@dev", - "phpstan/phpstan": "^0.6.4", "phpunit/phpunit": "<6.0 || ^7.0" }, "type": "library", @@ -250,7 +269,12 @@ "datetime", "time" ], - "time": "2019-06-17T15:19:18+00:00" + "support": { + "irc": "irc://irc.freenode.org/cakephp", + "issues": "https://github.com/cakephp/chronos/issues", + "source": "https://github.com/cakephp/chronos" + }, + "time": "2019-11-30T02:33:19+00:00" }, { "name": "cakephp/migrations", @@ -303,34 +327,44 @@ "cakephp", "migrations" ], + "support": { + "forum": "http://stackoverflow.com/tags/cakephp", + "irc": "irc://irc.freenode.org/cakephp", + "issues": "https://github.com/cakephp/migrations/issues", + "source": "https://github.com/cakephp/migrations" + }, "time": "2018-04-16T01:35:59+00:00" }, { "name": "cakephp/plugin-installer", - "version": "1.1.0", + "version": "1.3.1", "source": { "type": "git", "url": "https://github.com/cakephp/plugin-installer.git", - "reference": "41373d0678490502f45adc7be88aa22d24ac1843" + "reference": "e27027aa2d3d8ab64452c6817629558685a064cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cakephp/plugin-installer/zipball/41373d0678490502f45adc7be88aa22d24ac1843", - "reference": "41373d0678490502f45adc7be88aa22d24ac1843", + "url": "https://api.github.com/repos/cakephp/plugin-installer/zipball/e27027aa2d3d8ab64452c6817629558685a064cb", + "reference": "e27027aa2d3d8ab64452c6817629558685a064cb", "shasum": "" }, + "require": { + "composer-plugin-api": "^1.0 || ^2.0", + "php": ">=5.6.0" + }, "require-dev": { - "cakephp/cakephp-codesniffer": "dev-master", - "composer/composer": "1.0.*@dev", - "phpunit/phpunit": "^4.8|^5.7|^6.0" + "cakephp/cakephp-codesniffer": "^3.3", + "composer/composer": "^2.0", + "phpunit/phpunit": "^5.7 || ^6.5 || ^8.5 || ^9.3" }, - "type": "composer-installer", + "type": "composer-plugin", "extra": { - "class": "Cake\\Composer\\Installer\\PluginInstaller" + "class": "Cake\\Composer\\Plugin" }, "autoload": { "psr-4": { - "Cake\\Composer\\": "src" + "Cake\\Composer\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -340,48 +374,51 @@ "authors": [ { "name": "CakePHP Community", - "homepage": "http://cakephp.org" + "homepage": "https://cakephp.org" } ], "description": "A composer installer for CakePHP 3.0+ plugins.", - "time": "2017-12-24T21:09:29+00:00" + "support": { + "issues": "https://github.com/cakephp/plugin-installer/issues", + "source": "https://github.com/cakephp/plugin-installer/tree/1.3.1" + }, + "time": "2020-10-29T04:00:42+00:00" }, { "name": "doctrine/cache", - "version": "v1.8.0", + "version": "2.1.1", "source": { "type": "git", "url": "https://github.com/doctrine/cache.git", - "reference": "d768d58baee9a4862ca783840eca1b9add7a7f57" + "reference": "331b4d5dbaeab3827976273e9356b3b453c300ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/d768d58baee9a4862ca783840eca1b9add7a7f57", - "reference": "d768d58baee9a4862ca783840eca1b9add7a7f57", + "url": "https://api.github.com/repos/doctrine/cache/zipball/331b4d5dbaeab3827976273e9356b3b453c300ce", + "reference": "331b4d5dbaeab3827976273e9356b3b453c300ce", "shasum": "" }, "require": { - "php": "~7.1" + "php": "~7.1 || ^8.0" }, "conflict": { "doctrine/common": ">2.2,<2.4" }, "require-dev": { "alcaeus/mongo-php-adapter": "^1.1", - "doctrine/coding-standard": "^4.0", + "cache/integration-tests": "dev-master", + "doctrine/coding-standard": "^8.0", "mongodb/mongodb": "^1.1", - "phpunit/phpunit": "^7.0", - "predis/predis": "~1.0" + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", + "predis/predis": "~1.0", + "psr/cache": "^1.0 || ^2.0 || ^3.0", + "symfony/cache": "^4.4 || ^5.2 || ^6.0@dev", + "symfony/var-exporter": "^4.4 || ^5.2 || ^6.0@dev" }, "suggest": { "alcaeus/mongo-php-adapter": "Required to use legacy MongoDB driver" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.8.x-dev" - } - }, "autoload": { "psr-4": { "Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache" @@ -392,6 +429,10 @@ "MIT" ], "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, { "name": "Roman Borschel", "email": "roman@code-factory.org" @@ -400,10 +441,6 @@ "name": "Benjamin Eberlei", "email": "kontakt@beberlei.de" }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, { "name": "Jonathan Wage", "email": "jonwage@gmail.com" @@ -413,41 +450,70 @@ "email": "schmittjoh@gmail.com" } ], - "description": "Caching library offering an object-oriented API for many cache backends", - "homepage": "https://www.doctrine-project.org", + "description": "PHP Doctrine Cache library is a popular cache implementation that supports many different drivers such as redis, memcache, apc, mongodb and others.", + "homepage": "https://www.doctrine-project.org/projects/cache.html", "keywords": [ + "abstraction", + "apcu", "cache", - "caching" + "caching", + "couchdb", + "memcached", + "php", + "redis", + "xcache" + ], + "support": { + "issues": "https://github.com/doctrine/cache/issues", + "source": "https://github.com/doctrine/cache/tree/2.1.1" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fcache", + "type": "tidelift" + } ], - "time": "2018-08-21T18:01:43+00:00" + "time": "2021-07-17T14:49:29+00:00" }, { "name": "doctrine/dbal", - "version": "v2.9.2", + "version": "2.13.3", "source": { "type": "git", "url": "https://github.com/doctrine/dbal.git", - "reference": "22800bd651c1d8d2a9719e2a3dc46d5108ebfcc9" + "reference": "0d7adf4cadfee6f70850e5b163e6cdd706417838" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/22800bd651c1d8d2a9719e2a3dc46d5108ebfcc9", - "reference": "22800bd651c1d8d2a9719e2a3dc46d5108ebfcc9", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/0d7adf4cadfee6f70850e5b163e6cdd706417838", + "reference": "0d7adf4cadfee6f70850e5b163e6cdd706417838", "shasum": "" }, "require": { - "doctrine/cache": "^1.0", + "doctrine/cache": "^1.0|^2.0", + "doctrine/deprecations": "^0.5.3", "doctrine/event-manager": "^1.0", "ext-pdo": "*", - "php": "^7.1" + "php": "^7.1 || ^8" }, "require-dev": { - "doctrine/coding-standard": "^5.0", - "jetbrains/phpstorm-stubs": "^2018.1.2", - "phpstan/phpstan": "^0.10.1", - "phpunit/phpunit": "^7.4", - "symfony/console": "^2.0.5|^3.0|^4.0", - "symfony/phpunit-bridge": "^3.4.5|^4.0.5" + "doctrine/coding-standard": "9.0.0", + "jetbrains/phpstorm-stubs": "2021.1", + "phpstan/phpstan": "0.12.96", + "phpunit/phpunit": "^7.5.20|^8.5|9.5.5", + "psalm/plugin-phpunit": "0.16.1", + "squizlabs/php_codesniffer": "3.6.0", + "symfony/cache": "^4.4", + "symfony/console": "^2.0.5|^3.0|^4.0|^5.0", + "vimeo/psalm": "4.10.0" }, "suggest": { "symfony/console": "For helpful console commands such as SQL execution and import of files." @@ -456,12 +522,6 @@ "bin/doctrine-dbal" ], "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.9.x-dev", - "dev-develop": "3.0.x-dev" - } - }, "autoload": { "psr-4": { "Doctrine\\DBAL\\": "lib/Doctrine/DBAL" @@ -472,6 +532,10 @@ "MIT" ], "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, { "name": "Roman Borschel", "email": "roman@code-factory.org" @@ -480,10 +544,6 @@ "name": "Benjamin Eberlei", "email": "kontakt@beberlei.de" }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, { "name": "Jonathan Wage", "email": "jonwage@gmail.com" @@ -494,37 +554,109 @@ "keywords": [ "abstraction", "database", + "db2", "dbal", + "mariadb", + "mssql", "mysql", - "persistence", + "oci8", + "oracle", + "pdo", "pgsql", - "php", - "queryobject" + "postgresql", + "queryobject", + "sasql", + "sql", + "sqlanywhere", + "sqlite", + "sqlserver", + "sqlsrv" + ], + "support": { + "issues": "https://github.com/doctrine/dbal/issues", + "source": "https://github.com/doctrine/dbal/tree/2.13.3" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fdbal", + "type": "tidelift" + } + ], + "time": "2021-09-12T19:11:48+00:00" + }, + { + "name": "doctrine/deprecations", + "version": "v0.5.3", + "source": { + "type": "git", + "url": "https://github.com/doctrine/deprecations.git", + "reference": "9504165960a1f83cc1480e2be1dd0a0478561314" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/9504165960a1f83cc1480e2be1dd0a0478561314", + "reference": "9504165960a1f83cc1480e2be1dd0a0478561314", + "shasum": "" + }, + "require": { + "php": "^7.1|^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^6.0|^7.0|^8.0", + "phpunit/phpunit": "^7.0|^8.0|^9.0", + "psr/log": "^1.0" + }, + "suggest": { + "psr/log": "Allows logging deprecations via PSR-3 logger implementation" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" ], - "time": "2018-12-31T03:27:51+00:00" + "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", + "homepage": "https://www.doctrine-project.org/", + "support": { + "issues": "https://github.com/doctrine/deprecations/issues", + "source": "https://github.com/doctrine/deprecations/tree/v0.5.3" + }, + "time": "2021-03-21T12:59:47+00:00" }, { "name": "doctrine/event-manager", - "version": "v1.0.0", + "version": "1.1.1", "source": { "type": "git", "url": "https://github.com/doctrine/event-manager.git", - "reference": "a520bc093a0170feeb6b14e9d83f3a14452e64b3" + "reference": "41370af6a30faa9dc0368c4a6814d596e81aba7f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/event-manager/zipball/a520bc093a0170feeb6b14e9d83f3a14452e64b3", - "reference": "a520bc093a0170feeb6b14e9d83f3a14452e64b3", + "url": "https://api.github.com/repos/doctrine/event-manager/zipball/41370af6a30faa9dc0368c4a6814d596e81aba7f", + "reference": "41370af6a30faa9dc0368c4a6814d596e81aba7f", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.1 || ^8.0" }, "conflict": { "doctrine/common": "<2.9@dev" }, "require-dev": { - "doctrine/coding-standard": "^4.0", + "doctrine/coding-standard": "^6.0", "phpunit/phpunit": "^7.0" }, "type": "library", @@ -543,6 +675,10 @@ "MIT" ], "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, { "name": "Roman Borschel", "email": "roman@code-factory.org" @@ -551,10 +687,6 @@ "name": "Benjamin Eberlei", "email": "kontakt@beberlei.de" }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, { "name": "Jonathan Wage", "email": "jonwage@gmail.com" @@ -568,14 +700,34 @@ "email": "ocramius@gmail.com" } ], - "description": "Doctrine Event Manager component", + "description": "The Doctrine Event Manager is a simple PHP event system that was built to be used with the various Doctrine projects.", "homepage": "https://www.doctrine-project.org/projects/event-manager.html", "keywords": [ "event", - "eventdispatcher", - "eventmanager" + "event dispatcher", + "event manager", + "event system", + "events" + ], + "support": { + "issues": "https://github.com/doctrine/event-manager/issues", + "source": "https://github.com/doctrine/event-manager/tree/1.1.x" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fevent-manager", + "type": "tidelift" + } ], - "time": "2018-06-11T11:59:03+00:00" + "time": "2020-05-29T18:28:51+00:00" }, { "name": "josegonzalez/dotenv", @@ -627,20 +779,169 @@ "dotenv", "php" ], + "support": { + "issues": "https://github.com/josegonzalez/php-dotenv/issues", + "source": "https://github.com/josegonzalez/php-dotenv/tree/2.1.0" + }, "time": "2017-01-03T01:04:05+00:00" }, + { + "name": "laminas/laminas-diactoros", + "version": "1.8.7p2", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-diactoros.git", + "reference": "6991c1af7c8d2c8efee81b22ba97024781824aaa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-diactoros/zipball/6991c1af7c8d2c8efee81b22ba97024781824aaa", + "reference": "6991c1af7c8d2c8efee81b22ba97024781824aaa", + "shasum": "" + }, + "require": { + "laminas/laminas-zendframework-bridge": "^1.0", + "php": "^5.6 || ^7.0", + "psr/http-message": "^1.0" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "replace": { + "zendframework/zend-diactoros": "~1.8.7.0" + }, + "require-dev": { + "ext-dom": "*", + "ext-libxml": "*", + "laminas/laminas-coding-standard": "~1.0", + "php-http/psr7-integration-tests": "dev-master", + "phpunit/phpunit": "^5.7.16 || ^6.0.8 || ^7.2.7" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-release-1.8": "1.8.x-dev" + } + }, + "autoload": { + "files": [ + "src/functions/create_uploaded_file.php", + "src/functions/marshal_headers_from_sapi.php", + "src/functions/marshal_method_from_sapi.php", + "src/functions/marshal_protocol_version_from_sapi.php", + "src/functions/marshal_uri_from_sapi.php", + "src/functions/normalize_server.php", + "src/functions/normalize_uploaded_files.php", + "src/functions/parse_cookie_header.php", + "src/functions/create_uploaded_file.legacy.php", + "src/functions/marshal_headers_from_sapi.legacy.php", + "src/functions/marshal_method_from_sapi.legacy.php", + "src/functions/marshal_protocol_version_from_sapi.legacy.php", + "src/functions/marshal_uri_from_sapi.legacy.php", + "src/functions/normalize_server.legacy.php", + "src/functions/normalize_uploaded_files.legacy.php", + "src/functions/parse_cookie_header.legacy.php" + ], + "psr-4": { + "Laminas\\Diactoros\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "PSR HTTP Message implementations", + "homepage": "https://laminas.dev", + "keywords": [ + "http", + "laminas", + "psr", + "psr-7" + ], + "support": { + "chat": "https://laminas.dev/chat", + "docs": "https://docs.laminas.dev/laminas-diactoros/", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/laminas/laminas-diactoros/issues", + "rss": "https://github.com/laminas/laminas-diactoros/releases.atom", + "source": "https://github.com/laminas/laminas-diactoros" + }, + "time": "2020-03-23T15:28:28+00:00" + }, + { + "name": "laminas/laminas-zendframework-bridge", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-zendframework-bridge.git", + "reference": "bf180a382393e7db5c1e8d0f2ec0c4af9c724baf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/bf180a382393e7db5c1e8d0f2ec0c4af9c724baf", + "reference": "bf180a382393e7db5c1e8d0f2ec0c4af9c724baf", + "shasum": "" + }, + "require": { + "php": "^7.3 || ~8.0.0 || ~8.1.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "psalm/plugin-phpunit": "^0.15.1", + "squizlabs/php_codesniffer": "^3.5", + "vimeo/psalm": "^4.6" + }, + "type": "library", + "extra": { + "laminas": { + "module": "Laminas\\ZendFrameworkBridge" + } + }, + "autoload": { + "files": [ + "src/autoload.php" + ], + "psr-4": { + "Laminas\\ZendFrameworkBridge\\": "src//" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Alias legacy ZF class names to Laminas Project equivalents.", + "keywords": [ + "ZendFramework", + "autoloading", + "laminas", + "zf" + ], + "support": { + "forum": "https://discourse.laminas.dev/", + "issues": "https://github.com/laminas/laminas-zendframework-bridge/issues", + "rss": "https://github.com/laminas/laminas-zendframework-bridge/releases.atom", + "source": "https://github.com/laminas/laminas-zendframework-bridge" + }, + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2021-09-03T17:53:30+00:00" + }, { "name": "m1/env", - "version": "2.1.2", + "version": "2.2.0", "source": { "type": "git", "url": "https://github.com/m1/Env.git", - "reference": "294addeedf15e1149eeb96ec829f2029d2017d39" + "reference": "5c296e3e13450a207e12b343f3af1d7ab569f6f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/m1/Env/zipball/294addeedf15e1149eeb96ec829f2029d2017d39", - "reference": "294addeedf15e1149eeb96ec829f2029d2017d39", + "url": "https://api.github.com/repos/m1/Env/zipball/5c296e3e13450a207e12b343f3af1d7ab569f6f3", + "reference": "5c296e3e13450a207e12b343f3af1d7ab569f6f3", "shasum": "" }, "require": { @@ -685,20 +986,24 @@ "parser", "support" ], - "time": "2018-06-19T18:55:08+00:00" + "support": { + "issues": "https://github.com/m1/Env/issues", + "source": "https://github.com/m1/Env/tree/2.2.0" + }, + "time": "2020-02-19T09:02:13+00:00" }, { "name": "mobiledetect/mobiledetectlib", - "version": "2.8.33", + "version": "2.8.37", "source": { "type": "git", "url": "https://github.com/serbanghita/Mobile-Detect.git", - "reference": "cd385290f9a0d609d2eddd165a1e44ec1bf12102" + "reference": "9841e3c46f5bd0739b53aed8ac677fa712943df7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/serbanghita/Mobile-Detect/zipball/cd385290f9a0d609d2eddd165a1e44ec1bf12102", - "reference": "cd385290f9a0d609d2eddd165a1e44ec1bf12102", + "url": "https://api.github.com/repos/serbanghita/Mobile-Detect/zipball/9841e3c46f5bd0739b53aed8ac677fa712943df7", + "reference": "9841e3c46f5bd0739b53aed8ac677fa712943df7", "shasum": "" }, "require": { @@ -737,7 +1042,67 @@ "mobile detector", "php mobile detect" ], - "time": "2018-09-01T15:05:15+00:00" + "support": { + "issues": "https://github.com/serbanghita/Mobile-Detect/issues", + "source": "https://github.com/serbanghita/Mobile-Detect/tree/2.8.37" + }, + "funding": [ + { + "url": "https://github.com/serbanghita", + "type": "github" + } + ], + "time": "2021-02-19T21:22:57+00:00" + }, + { + "name": "paragonie/random_compat", + "version": "v9.99.99", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", + "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", + "shasum": "" + }, + "require": { + "php": "^7" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*", + "vimeo/psalm": "^1" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "polyfill", + "pseudorandom", + "random" + ], + "support": { + "email": "info@paragonie.com", + "issues": "https://github.com/paragonie/random_compat/issues", + "source": "https://github.com/paragonie/random_compat" + }, + "time": "2018-07-02T15:55:56+00:00" }, { "name": "psr/http-message", @@ -787,20 +1152,23 @@ "request", "response" ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/master" + }, "time": "2016-08-06T14:39:51+00:00" }, { "name": "psr/log", - "version": "1.1.0", + "version": "1.1.4", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd" + "reference": "d49695b909c3b7628b6289db5479a1c204601f11" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", - "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", + "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11", "shasum": "" }, "require": { @@ -809,7 +1177,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.1.x-dev" } }, "autoload": { @@ -824,7 +1192,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for logging libraries", @@ -834,7 +1202,10 @@ "psr", "psr-3" ], - "time": "2018-11-20T15:27:04+00:00" + "support": { + "source": "https://github.com/php-fig/log/tree/1.1.4" + }, + "time": "2021-05-03T11:20:27+00:00" }, { "name": "psr/simple-cache", @@ -882,6 +1253,9 @@ "psr-16", "simple-cache" ], + "support": { + "source": "https://github.com/php-fig/simple-cache/tree/master" + }, "time": "2017-10-23T01:57:42+00:00" }, { @@ -948,20 +1322,24 @@ "migrations", "phinx" ], + "support": { + "issues": "https://github.com/cakephp/phinx/issues", + "source": "https://github.com/cakephp/phinx/tree/v0.8.1" + }, "time": "2017-06-05T13:30:19+00:00" }, { "name": "symfony/config", - "version": "v3.4.16", + "version": "v3.4.47", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "e5389132dc6320682de3643091121c048ff796b3" + "reference": "bc6b3fd3930d4b53a60b42fe2ed6fc466b75f03f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/e5389132dc6320682de3643091121c048ff796b3", - "reference": "e5389132dc6320682de3643091121c048ff796b3", + "url": "https://api.github.com/repos/symfony/config/zipball/bc6b3fd3930d4b53a60b42fe2ed6fc466b75f03f", + "reference": "bc6b3fd3930d4b53a60b42fe2ed6fc466b75f03f", "shasum": "" }, "require": { @@ -983,11 +1361,6 @@ "symfony/yaml": "To use the yaml reference dumper" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.4-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\Config\\": "" @@ -1012,20 +1385,37 @@ ], "description": "Symfony Config Component", "homepage": "https://symfony.com", - "time": "2018-09-08T13:15:14+00:00" + "support": { + "source": "https://github.com/symfony/config/tree/v3.4.47" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-10-24T10:57:07+00:00" }, { "name": "symfony/console", - "version": "v3.4.16", + "version": "v3.4.47", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "1cbaac35024c9dfc9612b7e2310e82677bf85709" + "reference": "a10b1da6fc93080c180bba7219b5ff5b7518fe81" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/1cbaac35024c9dfc9612b7e2310e82677bf85709", - "reference": "1cbaac35024c9dfc9612b7e2310e82677bf85709", + "url": "https://api.github.com/repos/symfony/console/zipball/a10b1da6fc93080c180bba7219b5ff5b7518fe81", + "reference": "a10b1da6fc93080c180bba7219b5ff5b7518fe81", "shasum": "" }, "require": { @@ -1037,6 +1427,9 @@ "symfony/dependency-injection": "<3.4", "symfony/process": "<3.3" }, + "provide": { + "psr/log-implementation": "1.0" + }, "require-dev": { "psr/log": "~1.0", "symfony/config": "~3.3|~4.0", @@ -1046,17 +1439,12 @@ "symfony/process": "~3.3|~4.0" }, "suggest": { - "psr/log-implementation": "For using the console logger", + "psr/log": "For using the console logger", "symfony/event-dispatcher": "", "symfony/lock": "", "symfony/process": "" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.4-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\Console\\": "" @@ -1081,38 +1469,50 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2018-09-30T03:37:36+00:00" + "support": { + "source": "https://github.com/symfony/console/tree/v3.4.47" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-10-24T10:57:07+00:00" }, { "name": "symfony/debug", - "version": "v3.4.16", + "version": "v4.4.27", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "b70cfaae39009ecde3164bb8cba4d029220d27b1" + "reference": "2f9160e92eb64c95da7368c867b663a8e34e980c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/b70cfaae39009ecde3164bb8cba4d029220d27b1", - "reference": "b70cfaae39009ecde3164bb8cba4d029220d27b1", + "url": "https://api.github.com/repos/symfony/debug/zipball/2f9160e92eb64c95da7368c867b663a8e34e980c", + "reference": "2f9160e92eb64c95da7368c867b663a8e34e980c", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8", - "psr/log": "~1.0" + "php": ">=7.1.3", + "psr/log": "^1|^2|^3" }, "conflict": { - "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" + "symfony/http-kernel": "<3.4" }, "require-dev": { - "symfony/http-kernel": "~2.8|~3.0|~4.0" + "symfony/http-kernel": "^3.4|^4.0|^5.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.4-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\Debug\\": "" @@ -1135,34 +1535,47 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Debug Component", + "description": "Provides tools to ease debugging PHP code", "homepage": "https://symfony.com", - "time": "2018-09-22T18:25:03+00:00" - }, + "support": { + "source": "https://github.com/symfony/debug/tree/v4.4.27" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-07-22T07:21:39+00:00" + }, { "name": "symfony/filesystem", - "version": "v3.4.16", + "version": "v4.4.27", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "f89ab242d915d188fca95ee3291c72c5a094a195" + "reference": "517fb795794faf29086a77d99eb8f35e457837a7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/f89ab242d915d188fca95ee3291c72c5a094a195", - "reference": "f89ab242d915d188fca95ee3291c72c5a094a195", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/517fb795794faf29086a77d99eb8f35e457837a7", + "reference": "517fb795794faf29086a77d99eb8f35e457837a7", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8", - "symfony/polyfill-ctype": "~1.8" + "php": ">=7.1.3", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-php80": "^1.16" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.4-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\Filesystem\\": "" @@ -1185,26 +1598,43 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Filesystem Component", + "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", - "time": "2018-09-30T03:32:28+00:00" + "support": { + "source": "https://github.com/symfony/filesystem/tree/v4.4.27" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-07-21T12:19:41+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.9.0", + "version": "v1.23.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "e3d826245268269cd66f8326bd8bc066687b4a19" + "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19", - "reference": "e3d826245268269cd66f8326bd8bc066687b4a19", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", + "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "suggest": { "ext-ctype": "For best performance" @@ -1212,7 +1642,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.9-dev" + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -1228,13 +1662,13 @@ "MIT" ], "authors": [ - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - }, { "name": "Gert de Pagter", "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], "description": "Symfony polyfill for ctype functions", @@ -1245,24 +1679,41 @@ "polyfill", "portable" ], - "time": "2018-08-06T14:22:27+00:00" + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-02-19T12:13:01+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.9.0", + "version": "v1.23.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8" + "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/d0cd638f4634c16d8df4508e847f14e9e43168b8", - "reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6", + "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "suggest": { "ext-mbstring": "For best performance" @@ -1270,7 +1721,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.9-dev" + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -1304,47 +1759,61 @@ "portable", "shim" ], - "time": "2018-08-06T14:22:27+00:00" + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-05-27T12:26:48+00:00" }, { - "name": "symfony/yaml", - "version": "v3.4.16", + "name": "symfony/polyfill-php80", + "version": "v1.23.1", "source": { "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "61973ecda60e9f3561e929e19c07d4878b960fc1" + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/61973ecda60e9f3561e929e19c07d4878b960fc1", - "reference": "61973ecda60e9f3561e929e19c07d4878b960fc1", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/1100343ed1a92e3a38f9ae122fc0eb21602547be", + "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8", - "symfony/polyfill-ctype": "~1.8" - }, - "conflict": { - "symfony/console": "<3.4" - }, - "require-dev": { - "symfony/console": "~3.4|~4.0" - }, - "suggest": { - "symfony/console": "For validating YAML files using the lint command" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.4-dev" + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { "psr-4": { - "Symfony\\Component\\Yaml\\": "" + "Symfony\\Polyfill\\Php80\\": "" }, - "exclude-from-classmap": [ - "/Tests/" + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" ] }, "notification-url": "https://packagist.org/downloads/", @@ -1353,104 +1822,141 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Yaml Component", + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", "homepage": "https://symfony.com", - "time": "2018-09-24T08:15:45+00:00" + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.23.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-07-28T13:41:28+00:00" }, { - "name": "zendframework/zend-diactoros", - "version": "1.8.7", + "name": "symfony/yaml", + "version": "v3.4.47", "source": { "type": "git", - "url": "https://github.com/zendframework/zend-diactoros.git", - "reference": "a85e67b86e9b8520d07e6415fcbcb8391b44a75b" + "url": "https://github.com/symfony/yaml.git", + "reference": "88289caa3c166321883f67fe5130188ebbb47094" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-diactoros/zipball/a85e67b86e9b8520d07e6415fcbcb8391b44a75b", - "reference": "a85e67b86e9b8520d07e6415fcbcb8391b44a75b", + "url": "https://api.github.com/repos/symfony/yaml/zipball/88289caa3c166321883f67fe5130188ebbb47094", + "reference": "88289caa3c166321883f67fe5130188ebbb47094", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0", - "psr/http-message": "^1.0" + "php": "^5.5.9|>=7.0.8", + "symfony/polyfill-ctype": "~1.8" }, - "provide": { - "psr/http-message-implementation": "1.0" + "conflict": { + "symfony/console": "<3.4" }, "require-dev": { - "ext-dom": "*", - "ext-libxml": "*", - "php-http/psr7-integration-tests": "dev-master", - "phpunit/phpunit": "^5.7.16 || ^6.0.8 || ^7.2.7", - "zendframework/zend-coding-standard": "~1.0" + "symfony/console": "~3.4|~4.0" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-release-1.8": "1.8.x-dev" - } + "suggest": { + "symfony/console": "For validating YAML files using the lint command" }, + "type": "library", "autoload": { - "files": [ - "src/functions/create_uploaded_file.php", - "src/functions/marshal_headers_from_sapi.php", - "src/functions/marshal_method_from_sapi.php", - "src/functions/marshal_protocol_version_from_sapi.php", - "src/functions/marshal_uri_from_sapi.php", - "src/functions/normalize_server.php", - "src/functions/normalize_uploaded_files.php", - "src/functions/parse_cookie_header.php" - ], "psr-4": { - "Zend\\Diactoros\\": "src/" - } + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-2-Clause" + "MIT" ], - "description": "PSR HTTP Message implementations", - "homepage": "https://github.com/zendframework/zend-diactoros", - "keywords": [ - "http", - "psr", - "psr-7" + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Yaml Component", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/yaml/tree/v3.4.47" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } ], - "time": "2019-08-06T17:53:53+00:00" + "time": "2020-10-24T10:57:07+00:00" } ], "packages-dev": [ { "name": "ajgl/breakpoint-twig-extension", - "version": "0.3.1", + "version": "0.3.5", "source": { "type": "git", "url": "https://github.com/ajgarlag/AjglBreakpointTwigExtension.git", - "reference": "360ec6351ad7e1968ee78abb31430046c2e04fc5" + "reference": "9875feea0ac4bc3c9f308c62bae4727669d6052a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ajgarlag/AjglBreakpointTwigExtension/zipball/360ec6351ad7e1968ee78abb31430046c2e04fc5", - "reference": "360ec6351ad7e1968ee78abb31430046c2e04fc5", + "url": "https://api.github.com/repos/ajgarlag/AjglBreakpointTwigExtension/zipball/9875feea0ac4bc3c9f308c62bae4727669d6052a", + "reference": "9875feea0ac4bc3c9f308c62bae4727669d6052a", "shasum": "" }, "require": { "php": ">=5.6", - "twig/twig": "^1.14|^2.0" + "twig/twig": "^1.34|^2.0|^3.0" }, "require-dev": { - "phpunit/phpunit": "^5", - "symfony/framework-bundle": "^2.7|^3.2", - "symfony/twig-bundle": "^2.7|^3.2" + "friendsofphp/php-cs-fixer": "^2.18", + "symfony/framework-bundle": "^2.7|^3.4|^4.4|^5.2", + "symfony/phpunit-bridge": "^4.4|^5.2", + "symfony/twig-bundle": "^2.7|^3.4|^4.4|^5.2" }, "suggest": { "ext-xdebug": "The Xdebug extension is required for the breakpoint to work", @@ -1487,7 +1993,11 @@ "breakpoint", "twig" ], - "time": "2017-11-20T13:04:11+00:00" + "support": { + "issues": "https://github.com/ajgarlag/AjglBreakpointTwigExtension/issues", + "source": "https://github.com/ajgarlag/AjglBreakpointTwigExtension/tree/0.3.5" + }, + "time": "2021-02-08T10:48:05+00:00" }, { "name": "aptoma/twig-markdown", @@ -1544,20 +2054,24 @@ "markdown", "twig" ], + "support": { + "issues": "https://github.com/aptoma/twig-markdown/issues", + "source": "https://github.com/aptoma/twig-markdown/tree/master" + }, "time": "2015-10-23T20:27:08+00:00" }, { "name": "asm89/twig-cache-extension", - "version": "1.3.2", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/asm89/twig-cache-extension.git", - "reference": "630ea7abdc3fc62ba6786c02590a1560e449cf55" + "reference": "13787226956ec766f4770722082288097aebaaf3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/asm89/twig-cache-extension/zipball/630ea7abdc3fc62ba6786c02590a1560e449cf55", - "reference": "630ea7abdc3fc62ba6786c02590a1560e449cf55", + "url": "https://api.github.com/repos/asm89/twig-cache-extension/zipball/13787226956ec766f4770722082288097aebaaf3", + "reference": "13787226956ec766f4770722082288097aebaaf3", "shasum": "" }, "require": { @@ -1565,7 +2079,8 @@ "twig/twig": "^1.0|^2.0" }, "require-dev": { - "doctrine/cache": "~1.0" + "doctrine/cache": "~1.0", + "phpunit/phpunit": "^5.0 || ^4.8.10" }, "suggest": { "psr/cache-implementation": "To make use of PSR-6 cache implementation via PsrCacheAdapter." @@ -1573,7 +2088,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "1.4-dev" } }, "autoload": { @@ -1598,27 +2113,32 @@ "extension", "twig" ], - "time": "2017-01-10T22:04:15+00:00" + "support": { + "issues": "https://github.com/asm89/twig-cache-extension/issues", + "source": "https://github.com/asm89/twig-cache-extension/tree/1.4.0" + }, + "abandoned": "twig/cache-extension", + "time": "2020-01-01T20:47:37+00:00" }, { "name": "cakephp/bake", - "version": "1.8.4", + "version": "1.12.0", "source": { "type": "git", "url": "https://github.com/cakephp/bake.git", - "reference": "7356656e236bb62733f4fdd4894ce1f26f9e14f6" + "reference": "33e8ee8419ba36c13fa4074c208c93352b5530cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cakephp/bake/zipball/7356656e236bb62733f4fdd4894ce1f26f9e14f6", - "reference": "7356656e236bb62733f4fdd4894ce1f26f9e14f6", + "url": "https://api.github.com/repos/cakephp/bake/zipball/33e8ee8419ba36c13fa4074c208c93352b5530cf", + "reference": "33e8ee8419ba36c13fa4074c208c93352b5530cf", "shasum": "" }, "require": { - "cakephp/cakephp": "^3.6.0", + "cakephp/cakephp": "^3.8.0", "cakephp/plugin-installer": "^1.0", "php": ">=5.6.0", - "wyrihaximus/twig-view": "^4.3.4" + "wyrihaximus/twig-view": "^4.3.7" }, "require-dev": { "cakephp/cakephp-codesniffer": "^3.0", @@ -1627,7 +2147,7 @@ "type": "cakephp-plugin", "autoload": { "psr-4": { - "Bake\\": "src" + "Bake\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1646,24 +2166,30 @@ "bake", "cakephp" ], - "time": "2018-08-21T01:28:47+00:00" + "support": { + "forum": "https://stackoverflow.com/tags/cakephp", + "irc": "irc://irc.freenode.org/cakephp", + "issues": "https://github.com/cakephp/bake/issues", + "source": "https://github.com/cakephp/bake" + }, + "time": "2019-12-07T20:34:43+00:00" }, { "name": "cakephp/cakephp-codesniffer", - "version": "3.0.5", + "version": "3.3.0", "source": { "type": "git", "url": "https://github.com/cakephp/cakephp-codesniffer.git", - "reference": "7f467fee00fd016b62cf8c85a57750ab2a895e81" + "reference": "7998a191e787fd5b68cb635d7050cb0d7b55e1a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cakephp/cakephp-codesniffer/zipball/7f467fee00fd016b62cf8c85a57750ab2a895e81", - "reference": "7f467fee00fd016b62cf8c85a57750ab2a895e81", + "url": "https://api.github.com/repos/cakephp/cakephp-codesniffer/zipball/7998a191e787fd5b68cb635d7050cb0d7b55e1a1", + "reference": "7998a191e787fd5b68cb635d7050cb0d7b55e1a1", "shasum": "" }, "require": { - "php": ">=5.4", + "php": ">=5.6", "squizlabs/php_codesniffer": "^3.0.0" }, "require-dev": { @@ -1672,7 +2198,7 @@ "type": "phpcodesniffer-standard", "autoload": { "psr-4": { - "CakePHP\\": "CakePHP" + "CakePHP\\": "CakePHP/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1686,37 +2212,44 @@ } ], "description": "CakePHP CodeSniffer Standards", - "homepage": "http://cakephp.org", + "homepage": "https://cakephp.org", "keywords": [ "codesniffer", "framework" ], - "time": "2018-06-09T16:01:01+00:00" + "support": { + "forum": "https://stackoverflow.com/tags/cakephp", + "irc": "irc://irc.freenode.org/cakephp", + "issues": "https://github.com/cakephp/cakephp-codesniffer/issues", + "source": "https://github.com/cakephp/cakephp-codesniffer" + }, + "time": "2019-12-07T03:02:34+00:00" }, { "name": "cakephp/debug_kit", - "version": "3.16.4", + "version": "3.23.0", "source": { "type": "git", "url": "https://github.com/cakephp/debug_kit.git", - "reference": "d5cd81818b65da0849089a66316744e4cc453d70" + "reference": "49506b55d0b7becf4803e895b07a8cd8599ab1e4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cakephp/debug_kit/zipball/d5cd81818b65da0849089a66316744e4cc453d70", - "reference": "d5cd81818b65da0849089a66316744e4cc453d70", + "url": "https://api.github.com/repos/cakephp/debug_kit/zipball/49506b55d0b7becf4803e895b07a8cd8599ab1e4", + "reference": "49506b55d0b7becf4803e895b07a8cd8599ab1e4", "shasum": "" }, "require": { - "cakephp/cakephp": "^3.6.0", + "cakephp/cakephp": "^3.7.0", "cakephp/chronos": "^1.0.0", - "cakephp/plugin-installer": "^1.0.0", - "composer/composer": "^1.3.0", + "composer/composer": "^1.3 | ^2.0", "jdorn/sql-formatter": "^1.2.0", "php": ">=5.6.0" }, "require-dev": { + "cakephp/authorization": "^1.3.2", "cakephp/cakephp-codesniffer": "^3.0", + "cakephp/plugin-installer": "^1.3", "phpunit/phpunit": "^5.7.14|^6.0" }, "suggest": { @@ -1725,8 +2258,8 @@ "type": "cakephp-plugin", "autoload": { "psr-4": { - "DebugKit\\": "src", - "DebugKit\\Test\\Fixture\\": "tests\\Fixture" + "DebugKit\\": "src/", + "DebugKit\\Test\\Fixture\\": "tests/Fixture/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1736,7 +2269,7 @@ "authors": [ { "name": "Mark Story", - "homepage": "http://mark-story.com", + "homepage": "https://mark-story.com", "role": "Author" }, { @@ -1751,36 +2284,43 @@ "debug", "kit" ], - "time": "2018-08-03T13:57:51+00:00" + "support": { + "forum": "http://stackoverflow.com/tags/cakephp", + "irc": "irc://irc.freenode.org/cakephp", + "issues": "https://github.com/cakephp/debug_kit/issues", + "source": "https://github.com/cakephp/debug_kit" + }, + "time": "2021-05-16T04:58:57+00:00" }, { "name": "composer/ca-bundle", - "version": "1.1.2", + "version": "1.2.10", "source": { "type": "git", "url": "https://github.com/composer/ca-bundle.git", - "reference": "46afded9720f40b9dc63542af4e3e43a1177acb0" + "reference": "9fdb22c2e97a614657716178093cd1da90a64aa8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/46afded9720f40b9dc63542af4e3e43a1177acb0", - "reference": "46afded9720f40b9dc63542af4e3e43a1177acb0", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/9fdb22c2e97a614657716178093cd1da90a64aa8", + "reference": "9fdb22c2e97a614657716178093cd1da90a64aa8", "shasum": "" }, "require": { "ext-openssl": "*", "ext-pcre": "*", - "php": "^5.3.2 || ^7.0" + "php": "^5.3.2 || ^7.0 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5", + "phpstan/phpstan": "^0.12.55", "psr/log": "^1.0", - "symfony/process": "^2.5 || ^3.0 || ^4.0" + "symfony/phpunit-bridge": "^4.2 || ^5", + "symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.x-dev" + "dev-main": "1.x-dev" } }, "autoload": { @@ -1807,43 +2347,61 @@ "ssl", "tls" ], - "time": "2018-08-08T08:57:40+00:00" + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/ca-bundle/issues", + "source": "https://github.com/composer/ca-bundle/tree/1.2.10" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2021-06-07T13:58:28+00:00" }, { "name": "composer/composer", - "version": "1.7.2", + "version": "2.1.8", "source": { "type": "git", "url": "https://github.com/composer/composer.git", - "reference": "576aab9b5abb2ed11a1c52353a759363216a4ad2" + "reference": "24d38e9686092de05214cafa187dc282a5d89497" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/composer/zipball/576aab9b5abb2ed11a1c52353a759363216a4ad2", - "reference": "576aab9b5abb2ed11a1c52353a759363216a4ad2", + "url": "https://api.github.com/repos/composer/composer/zipball/24d38e9686092de05214cafa187dc282a5d89497", + "reference": "24d38e9686092de05214cafa187dc282a5d89497", "shasum": "" }, "require": { "composer/ca-bundle": "^1.0", - "composer/semver": "^1.0", + "composer/metadata-minifier": "^1.0", + "composer/semver": "^3.0", "composer/spdx-licenses": "^1.2", - "composer/xdebug-handler": "^1.1", - "justinrainbow/json-schema": "^3.0 || ^4.0 || ^5.0", - "php": "^5.3.2 || ^7.0", + "composer/xdebug-handler": "^2.0", + "justinrainbow/json-schema": "^5.2.11", + "php": "^5.3.2 || ^7.0 || ^8.0", "psr/log": "^1.0", + "react/promise": "^1.2 || ^2.7", "seld/jsonlint": "^1.4", "seld/phar-utils": "^1.0", - "symfony/console": "^2.7 || ^3.0 || ^4.0", - "symfony/filesystem": "^2.7 || ^3.0 || ^4.0", - "symfony/finder": "^2.7 || ^3.0 || ^4.0", - "symfony/process": "^2.7 || ^3.0 || ^4.0" - }, - "conflict": { - "symfony/console": "2.8.38" + "symfony/console": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0", + "symfony/filesystem": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0", + "symfony/finder": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0", + "symfony/process": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7", - "phpunit/phpunit-mock-objects": "^2.3 || ^3.0" + "phpspec/prophecy": "^1.10", + "symfony/phpunit-bridge": "^4.2 || ^5.0 || ^6.0" }, "suggest": { "ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages", @@ -1856,7 +2414,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.7-dev" + "dev-master": "2.1-dev" } }, "autoload": { @@ -1872,48 +2430,136 @@ { "name": "Nils Adermann", "email": "naderman@naderman.de", - "homepage": "http://www.naderman.de" + "homepage": "https://www.naderman.de" }, { "name": "Jordi Boggiano", "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" + "homepage": "https://seld.be" } ], - "description": "Composer helps you declare, manage and install dependencies of PHP projects, ensuring you have the right stack everywhere.", + "description": "Composer helps you declare, manage and install dependencies of PHP projects. It ensures you have the right stack everywhere.", "homepage": "https://getcomposer.org/", "keywords": [ "autoload", "dependency", "package" ], - "time": "2018-08-16T14:57:12+00:00" + "support": { + "irc": "ircs://irc.libera.chat:6697/composer", + "issues": "https://github.com/composer/composer/issues", + "source": "https://github.com/composer/composer/tree/2.1.8" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2021-09-15T11:55:15+00:00" + }, + { + "name": "composer/metadata-minifier", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/composer/metadata-minifier.git", + "reference": "c549d23829536f0d0e984aaabbf02af91f443207" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/metadata-minifier/zipball/c549d23829536f0d0e984aaabbf02af91f443207", + "reference": "c549d23829536f0d0e984aaabbf02af91f443207", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "composer/composer": "^2", + "phpstan/phpstan": "^0.12.55", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\MetadataMinifier\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Small utility library that handles metadata minification and expansion.", + "keywords": [ + "composer", + "compression" + ], + "support": { + "issues": "https://github.com/composer/metadata-minifier/issues", + "source": "https://github.com/composer/metadata-minifier/tree/1.0.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2021-04-07T13:37:33+00:00" }, { "name": "composer/semver", - "version": "1.4.2", + "version": "3.2.5", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "c7cb9a2095a074d131b65a8a0cd294479d785573" + "reference": "31f3ea725711245195f62e54ffa402d8ef2fdba9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/c7cb9a2095a074d131b65a8a0cd294479d785573", - "reference": "c7cb9a2095a074d131b65a8a0cd294479d785573", + "url": "https://api.github.com/repos/composer/semver/zipball/31f3ea725711245195f62e54ffa402d8ef2fdba9", + "reference": "31f3ea725711245195f62e54ffa402d8ef2fdba9", "shasum": "" }, "require": { - "php": "^5.3.2 || ^7.0" + "php": "^5.3.2 || ^7.0 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^4.5 || ^5.0.5", - "phpunit/phpunit-mock-objects": "2.3.0 || ^3.0" + "phpstan/phpstan": "^0.12.54", + "symfony/phpunit-bridge": "^4.2 || ^5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.x-dev" + "dev-main": "3.x-dev" } }, "autoload": { @@ -1949,33 +2595,51 @@ "validation", "versioning" ], - "time": "2016-08-30T16:08:34+00:00" + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/semver/issues", + "source": "https://github.com/composer/semver/tree/3.2.5" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2021-05-24T12:41:47+00:00" }, { "name": "composer/spdx-licenses", - "version": "1.4.0", + "version": "1.5.5", "source": { "type": "git", "url": "https://github.com/composer/spdx-licenses.git", - "reference": "cb17687e9f936acd7e7245ad3890f953770dec1b" + "reference": "de30328a7af8680efdc03e396aad24befd513200" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/cb17687e9f936acd7e7245ad3890f953770dec1b", - "reference": "cb17687e9f936acd7e7245ad3890f953770dec1b", + "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/de30328a7af8680efdc03e396aad24befd513200", + "reference": "de30328a7af8680efdc03e396aad24befd513200", "shasum": "" }, "require": { - "php": "^5.3.2 || ^7.0" + "php": "^5.3.2 || ^7.0 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5", - "phpunit/phpunit-mock-objects": "2.3.0 || ^3.0" + "phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 7" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.x-dev" + "dev-main": "1.x-dev" } }, "autoload": { @@ -2010,28 +2674,48 @@ "spdx", "validator" ], - "time": "2018-04-30T10:33:04+00:00" + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/spdx-licenses/issues", + "source": "https://github.com/composer/spdx-licenses/tree/1.5.5" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2020-12-03T16:04:16+00:00" }, { "name": "composer/xdebug-handler", - "version": "1.3.0", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "b8e9745fb9b06ea6664d8872c4505fb16df4611c" + "reference": "84674dd3a7575ba617f5a76d7e9e29a7d3891339" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/b8e9745fb9b06ea6664d8872c4505fb16df4611c", - "reference": "b8e9745fb9b06ea6664d8872c4505fb16df4611c", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/84674dd3a7575ba617f5a76d7e9e29a7d3891339", + "reference": "84674dd3a7575ba617f5a76d7e9e29a7d3891339", "shasum": "" }, "require": { - "php": "^5.3.2 || ^7.0", - "psr/log": "^1.0" + "php": "^5.3.2 || ^7.0 || ^8.0", + "psr/log": "^1 || ^2 || ^3" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5" + "phpstan/phpstan": "^0.12.55", + "symfony/phpunit-bridge": "^4.2 || ^5" }, "type": "library", "autoload": { @@ -2049,131 +2733,31 @@ "email": "john-stevenson@blueyonder.co.uk" } ], - "description": "Restarts a process without xdebug.", + "description": "Restarts a process without Xdebug.", "keywords": [ "Xdebug", "performance" ], - "time": "2018-08-31T19:07:57+00:00" - }, - { - "name": "dnoegel/php-xdg-base-dir", - "version": "0.1", - "source": { - "type": "git", - "url": "https://github.com/dnoegel/php-xdg-base-dir.git", - "reference": "265b8593498b997dc2d31e75b89f053b5cc9621a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/dnoegel/php-xdg-base-dir/zipball/265b8593498b997dc2d31e75b89f053b5cc9621a", - "reference": "265b8593498b997dc2d31e75b89f053b5cc9621a", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "require-dev": { - "phpunit/phpunit": "@stable" - }, - "type": "project", - "autoload": { - "psr-4": { - "XdgBaseDir\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "implementation of xdg base directory specification for php", - "time": "2014-10-24T07:27:01+00:00" - }, - { - "name": "jakub-onderka/php-console-color", - "version": "v0.2", - "source": { - "type": "git", - "url": "https://github.com/JakubOnderka/PHP-Console-Color.git", - "reference": "d5deaecff52a0d61ccb613bb3804088da0307191" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Color/zipball/d5deaecff52a0d61ccb613bb3804088da0307191", - "reference": "d5deaecff52a0d61ccb613bb3804088da0307191", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/xdebug-handler/issues", + "source": "https://github.com/composer/xdebug-handler/tree/2.0.2" }, - "require-dev": { - "jakub-onderka/php-code-style": "1.0", - "jakub-onderka/php-parallel-lint": "1.0", - "jakub-onderka/php-var-dump-check": "0.*", - "phpunit/phpunit": "~4.3", - "squizlabs/php_codesniffer": "1.*" - }, - "type": "library", - "autoload": { - "psr-4": { - "JakubOnderka\\PhpConsoleColor\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-2-Clause" - ], - "authors": [ + "funding": [ { - "name": "Jakub Onderka", - "email": "jakub.onderka@gmail.com" - } - ], - "time": "2018-09-29T17:23:10+00:00" - }, - { - "name": "jakub-onderka/php-console-highlighter", - "version": "v0.3.2", - "source": { - "type": "git", - "url": "https://github.com/JakubOnderka/PHP-Console-Highlighter.git", - "reference": "7daa75df45242c8d5b75a22c00a201e7954e4fb5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Highlighter/zipball/7daa75df45242c8d5b75a22c00a201e7954e4fb5", - "reference": "7daa75df45242c8d5b75a22c00a201e7954e4fb5", - "shasum": "" - }, - "require": { - "jakub-onderka/php-console-color": "~0.1", - "php": ">=5.3.0" - }, - "require-dev": { - "jakub-onderka/php-code-style": "~1.0", - "jakub-onderka/php-parallel-lint": "~0.5", - "jakub-onderka/php-var-dump-check": "~0.1", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~1.5" - }, - "type": "library", - "autoload": { - "psr-0": { - "JakubOnderka\\PhpConsoleHighlighter": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, { - "name": "Jakub Onderka", - "email": "acci@acci.cz", - "homepage": "http://www.acci.cz/" + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" } ], - "time": "2015-04-20T18:58:01+00:00" + "time": "2021-07-31T17:03:58+00:00" }, { "name": "jasny/twig-extensions", @@ -2233,6 +2817,10 @@ "text", "time" ], + "support": { + "issues": "https://github.com/jasny/twig-extensions/issues", + "source": "https://github.com/jasny/twig-extensions" + }, "time": "2017-09-13T07:38:01+00:00" }, { @@ -2283,27 +2871,31 @@ "highlight", "sql" ], + "support": { + "issues": "https://github.com/jdorn/sql-formatter/issues", + "source": "https://github.com/jdorn/sql-formatter/tree/master" + }, "time": "2014-01-12T16:20:24+00:00" }, { "name": "justinrainbow/json-schema", - "version": "5.2.7", + "version": "5.2.11", "source": { "type": "git", "url": "https://github.com/justinrainbow/json-schema.git", - "reference": "8560d4314577199ba51bf2032f02cd1315587c23" + "reference": "2ab6744b7296ded80f8cc4f9509abbff393399aa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/8560d4314577199ba51bf2032f02cd1315587c23", - "reference": "8560d4314577199ba51bf2032f02cd1315587c23", + "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/2ab6744b7296ded80f8cc4f9509abbff393399aa", + "reference": "2ab6744b7296ded80f8cc4f9509abbff393399aa", "shasum": "" }, "require": { "php": ">=5.3.3" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^2.1", + "friendsofphp/php-cs-fixer": "~2.2.20||~2.15.1", "json-schema/json-schema-test-suite": "1.2.0", "phpunit/phpunit": "^4.8.35" }, @@ -2349,20 +2941,24 @@ "json", "schema" ], - "time": "2018-02-14T22:26:30+00:00" + "support": { + "issues": "https://github.com/justinrainbow/json-schema/issues", + "source": "https://github.com/justinrainbow/json-schema/tree/5.2.11" + }, + "time": "2021-07-22T09:24:00+00:00" }, { "name": "nikic/php-parser", - "version": "v4.0.4", + "version": "v4.12.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "fa6ee28600d21d49b2b4e1006b48426cec8e579c" + "reference": "6608f01670c3cc5079e18c1dab1104e002579143" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/fa6ee28600d21d49b2b4e1006b48426cec8e579c", - "reference": "fa6ee28600d21d49b2b4e1006b48426cec8e579c", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/6608f01670c3cc5079e18c1dab1104e002579143", + "reference": "6608f01670c3cc5079e18c1dab1104e002579143", "shasum": "" }, "require": { @@ -2370,7 +2966,8 @@ "php": ">=7.0" }, "require-dev": { - "phpunit/phpunit": "^6.5 || ^7.0" + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" }, "bin": [ "bin/php-parse" @@ -2378,7 +2975,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.9-dev" } }, "autoload": { @@ -2400,36 +2997,37 @@ "parser", "php" ], - "time": "2018-09-18T07:03:24+00:00" + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v4.12.0" + }, + "time": "2021-07-21T10:44:31+00:00" }, { "name": "psy/psysh", - "version": "v0.9.8", + "version": "v0.10.8", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "ed3c32c4304e1a678a6e0f9dc11dd2d927d89555" + "reference": "e4573f47750dd6c92dca5aee543fa77513cbd8d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/ed3c32c4304e1a678a6e0f9dc11dd2d927d89555", - "reference": "ed3c32c4304e1a678a6e0f9dc11dd2d927d89555", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/e4573f47750dd6c92dca5aee543fa77513cbd8d3", + "reference": "e4573f47750dd6c92dca5aee543fa77513cbd8d3", "shasum": "" }, "require": { - "dnoegel/php-xdg-base-dir": "0.1", "ext-json": "*", "ext-tokenizer": "*", - "jakub-onderka/php-console-highlighter": "0.3.*", - "nikic/php-parser": "~1.3|~2.0|~3.0|~4.0", - "php": ">=5.4.0", - "symfony/console": "~2.3.10|^2.4.2|~3.0|~4.0", - "symfony/var-dumper": "~2.7|~3.0|~4.0" + "nikic/php-parser": "~4.0|~3.0|~2.0|~1.3", + "php": "^8.0 || ^7.0 || ^5.5.9", + "symfony/console": "~5.0|~4.0|~3.0|^2.4.2|~2.3.10", + "symfony/var-dumper": "~5.0|~4.0|~3.0|~2.7" }, "require-dev": { "bamarni/composer-bin-plugin": "^1.2", - "hoa/console": "~2.15|~3.16", - "phpunit/phpunit": "~4.8.35|~5.0|~6.0|~7.0" + "hoa/console": "3.17.*" }, "suggest": { "ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)", @@ -2444,7 +3042,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-develop": "0.9.x-dev" + "dev-main": "0.10.x-dev" } }, "autoload": { @@ -2474,24 +3072,78 @@ "interactive", "shell" ], - "time": "2018-09-05T11:40:09+00:00" + "support": { + "issues": "https://github.com/bobthecow/psysh/issues", + "source": "https://github.com/bobthecow/psysh/tree/v0.10.8" + }, + "time": "2021-04-10T16:23:39+00:00" + }, + { + "name": "react/promise", + "version": "v2.8.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/promise.git", + "reference": "f3cff96a19736714524ca0dd1d4130de73dbbbc4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/promise/zipball/f3cff96a19736714524ca0dd1d4130de73dbbbc4", + "reference": "f3cff96a19736714524ca0dd1d4130de73dbbbc4", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^7.0 || ^6.5 || ^5.7 || ^4.8.36" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\Promise\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com" + } + ], + "description": "A lightweight implementation of CommonJS Promises/A for PHP", + "keywords": [ + "promise", + "promises" + ], + "support": { + "issues": "https://github.com/reactphp/promise/issues", + "source": "https://github.com/reactphp/promise/tree/v2.8.0" + }, + "time": "2020-05-12T15:16:56+00:00" }, { "name": "seld/jsonlint", - "version": "1.7.1", + "version": "1.8.3", "source": { "type": "git", "url": "https://github.com/Seldaek/jsonlint.git", - "reference": "d15f59a67ff805a44c50ea0516d2341740f81a38" + "reference": "9ad6ce79c342fbd44df10ea95511a1b24dee5b57" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/d15f59a67ff805a44c50ea0516d2341740f81a38", - "reference": "d15f59a67ff805a44c50ea0516d2341740f81a38", + "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/9ad6ce79c342fbd44df10ea95511a1b24dee5b57", + "reference": "9ad6ce79c342fbd44df10ea95511a1b24dee5b57", "shasum": "" }, "require": { - "php": "^5.3 || ^7.0" + "php": "^5.3 || ^7.0 || ^8.0" }, "require-dev": { "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" @@ -2523,20 +3175,34 @@ "parser", "validator" ], - "time": "2018-01-24T12:46:19+00:00" + "support": { + "issues": "https://github.com/Seldaek/jsonlint/issues", + "source": "https://github.com/Seldaek/jsonlint/tree/1.8.3" + }, + "funding": [ + { + "url": "https://github.com/Seldaek", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/seld/jsonlint", + "type": "tidelift" + } + ], + "time": "2020-11-11T09:19:24+00:00" }, { "name": "seld/phar-utils", - "version": "1.0.1", + "version": "1.1.2", "source": { "type": "git", "url": "https://github.com/Seldaek/phar-utils.git", - "reference": "7009b5139491975ef6486545a39f3e6dad5ac30a" + "reference": "749042a2315705d2dfbbc59234dd9ceb22bf3ff0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/7009b5139491975ef6486545a39f3e6dad5ac30a", - "reference": "7009b5139491975ef6486545a39f3e6dad5ac30a", + "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/749042a2315705d2dfbbc59234dd9ceb22bf3ff0", + "reference": "749042a2315705d2dfbbc59234dd9ceb22bf3ff0", "shasum": "" }, "require": { @@ -2565,22 +3231,26 @@ ], "description": "PHAR file format utilities, for when PHP phars you up", "keywords": [ - "phra" + "phar" ], - "time": "2015-10-13T18:44:15+00:00" + "support": { + "issues": "https://github.com/Seldaek/phar-utils/issues", + "source": "https://github.com/Seldaek/phar-utils/tree/1.1.2" + }, + "time": "2021-08-19T21:01:38+00:00" }, { "name": "squizlabs/php_codesniffer", - "version": "3.3.2", + "version": "3.6.0", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "6ad28354c04b364c3c71a34e4a18b629cc3b231e" + "reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/6ad28354c04b364c3c71a34e4a18b629cc3b231e", - "reference": "6ad28354c04b364c3c71a34e4a18b629cc3b231e", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ffced0d2c8fa8e6cdc4d695a743271fab6c38625", + "reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625", "shasum": "" }, "require": { @@ -2613,36 +3283,37 @@ } ], "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "http://www.squizlabs.com/php-codesniffer", + "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", "keywords": [ "phpcs", "standards" ], - "time": "2018-09-23T23:08:17+00:00" + "support": { + "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", + "source": "https://github.com/squizlabs/PHP_CodeSniffer", + "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" + }, + "time": "2021-04-09T00:54:41+00:00" }, { "name": "symfony/finder", - "version": "v3.4.16", + "version": "v5.3.7", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "e8db87d755e14271e920e31ba834a4ae99483232" + "reference": "a10000ada1e600d109a6c7632e9ac42e8bf2fb93" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/e8db87d755e14271e920e31ba834a4ae99483232", - "reference": "e8db87d755e14271e920e31ba834a4ae99483232", + "url": "https://api.github.com/repos/symfony/finder/zipball/a10000ada1e600d109a6c7632e9ac42e8bf2fb93", + "reference": "a10000ada1e600d109a6c7632e9ac42e8bf2fb93", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8" + "php": ">=7.2.5", + "symfony/polyfill-php80": "^1.16" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.4-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\Finder\\": "" @@ -2665,33 +3336,122 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Finder Component", + "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", - "time": "2018-09-21T12:47:54+00:00" + "support": { + "source": "https://github.com/symfony/finder/tree/v5.3.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-08-04T21:20:46+00:00" }, { - "name": "symfony/process", - "version": "v3.4.16", + "name": "symfony/polyfill-php72", + "version": "v1.23.0", "source": { "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "8b87aca97f341d65dee430c60863f2442605c88b" + "url": "https://github.com/symfony/polyfill-php72.git", + "reference": "9a142215a36a3888e30d0a9eeea9766764e96976" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/8b87aca97f341d65dee430c60863f2442605c88b", - "reference": "8b87aca97f341d65dee430c60863f2442605c88b", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/9a142215a36a3888e30d0a9eeea9766764e96976", + "reference": "9a142215a36a3888e30d0a9eeea9766764e96976", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.4-dev" + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php72\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php72/tree/v1.23.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" } + ], + "time": "2021-05-27T09:17:38+00:00" + }, + { + "name": "symfony/process", + "version": "v5.3.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "38f26c7d6ed535217ea393e05634cb0b244a1967" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/38f26c7d6ed535217ea393e05634cb0b244a1967", + "reference": "38f26c7d6ed535217ea393e05634cb0b244a1967", + "shasum": "" }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-php80": "^1.16" + }, + "type": "library", "autoload": { "psr-4": { "Symfony\\Component\\Process\\": "" @@ -2714,46 +3474,66 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Process Component", + "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", - "time": "2018-09-08T13:15:14+00:00" + "support": { + "source": "https://github.com/symfony/process/tree/v5.3.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-08-04T21:20:46+00:00" }, { "name": "symfony/var-dumper", - "version": "v3.4.16", + "version": "v4.4.30", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "e57a24dc13accad1d5f90d232c5564910c5eb7b0" + "reference": "7f65c44c2ce80d3a0fcdb6385ee0ad535e45660c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/e57a24dc13accad1d5f90d232c5564910c5eb7b0", - "reference": "e57a24dc13accad1d5f90d232c5564910c5eb7b0", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/7f65c44c2ce80d3a0fcdb6385ee0ad535e45660c", + "reference": "7f65c44c2ce80d3a0fcdb6385ee0ad535e45660c", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8", - "symfony/polyfill-mbstring": "~1.0" + "php": ">=7.1.3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php72": "~1.5", + "symfony/polyfill-php80": "^1.16" }, "conflict": { - "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0" + "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0", + "symfony/console": "<3.4" }, "require-dev": { "ext-iconv": "*", - "twig/twig": "~1.34|~2.4" + "symfony/console": "^3.4|^4.0|^5.0", + "symfony/process": "^4.4|^5.0", + "twig/twig": "^1.43|^2.13|^3.0.4" }, "suggest": { "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).", "ext-intl": "To show region name in time zone dump", - "ext-symfony_debug": "" + "symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script" }, + "bin": [ + "Resources/bin/var-dump-server" + ], "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.4-dev" - } - }, "autoload": { "files": [ "Resources/functions/dump.php" @@ -2779,41 +3559,57 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony mechanism for exploring and dumping PHP variables", + "description": "Provides mechanisms for walking through any arbitrary PHP variable", "homepage": "https://symfony.com", "keywords": [ "debug", "dump" ], - "time": "2018-09-18T08:05:59+00:00" + "support": { + "source": "https://github.com/symfony/var-dumper/tree/v4.4.30" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-08-04T20:31:23+00:00" }, { "name": "twig/twig", - "version": "v1.35.4", + "version": "v1.44.5", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "7e081e98378a1e78c29cc9eba4aefa5d78a05d2a" + "reference": "dd4353357c5a116322e92a00d16043a31881a81e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/7e081e98378a1e78c29cc9eba4aefa5d78a05d2a", - "reference": "7e081e98378a1e78c29cc9eba4aefa5d78a05d2a", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/dd4353357c5a116322e92a00d16043a31881a81e", + "reference": "dd4353357c5a116322e92a00d16043a31881a81e", "shasum": "" }, "require": { - "php": ">=5.3.3", + "php": ">=7.2.5", "symfony/polyfill-ctype": "^1.8" }, "require-dev": { "psr/container": "^1.0", - "symfony/debug": "^2.7", - "symfony/phpunit-bridge": "^3.3" + "symfony/phpunit-bridge": "^4.4.9|^5.0.9" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.35-dev" + "dev-master": "1.44-dev" } }, "autoload": { @@ -2835,15 +3631,14 @@ "homepage": "http://fabien.potencier.org", "role": "Lead Developer" }, + { + "name": "Twig Team", + "role": "Contributors" + }, { "name": "Armin Ronacher", "email": "armin.ronacher@active-4.com", "role": "Project Founder" - }, - { - "name": "Twig Team", - "homepage": "https://twig.symfony.com/contributors", - "role": "Contributors" } ], "description": "Twig, the flexible, fast, and secure template language for PHP", @@ -2851,7 +3646,21 @@ "keywords": [ "templating" ], - "time": "2018-07-13T07:12:17+00:00" + "support": { + "issues": "https://github.com/twigphp/Twig/issues", + "source": "https://github.com/twigphp/Twig/tree/v1.44.5" + }, + "funding": [ + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/twig/twig", + "type": "tidelift" + } + ], + "time": "2021-09-17T08:35:19+00:00" }, { "name": "umpirsky/twig-php-function", @@ -2892,27 +3701,31 @@ } ], "description": "Call (almost) any PHP function from your Twig templates.", + "support": { + "issues": "https://github.com/umpirsky/twig-php-function/issues", + "source": "https://github.com/umpirsky/twig-php-function/tree/master" + }, "time": "2016-03-12T16:36:32+00:00" }, { "name": "wyrihaximus/twig-view", - "version": "4.3.5", + "version": "4.4.0", "source": { "type": "git", - "url": "https://github.com/WyriHaximus/TwigView.git", - "reference": "ec2771e6a1fe799f9b16eff19da424cd04d593b7" + "url": "https://github.com/cakephp/legacy-twig-view.git", + "reference": "463e1a6ed493d4fe99eaeaaf39d80172b51fc0fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/WyriHaximus/TwigView/zipball/ec2771e6a1fe799f9b16eff19da424cd04d593b7", - "reference": "ec2771e6a1fe799f9b16eff19da424cd04d593b7", + "url": "https://api.github.com/repos/cakephp/legacy-twig-view/zipball/463e1a6ed493d4fe99eaeaaf39d80172b51fc0fb", + "reference": "463e1a6ed493d4fe99eaeaaf39d80172b51fc0fb", "shasum": "" }, "require": { "ajgl/breakpoint-twig-extension": "^0.3.0", "aptoma/twig-markdown": "^2.0", "asm89/twig-cache-extension": "^1.0", - "cakephp/cakephp": "^3.5", + "cakephp/cakephp": "^3.7", "jasny/twig-extensions": "^1.0", "php": "^5.6 || ^7.0", "twig/twig": "^1.27", @@ -2921,9 +3734,9 @@ "require-dev": { "cakephp/bake": "^1.5", "cakephp/debug_kit": "^3.0", - "phake/phake": "^1.0.4", + "phake/phake": "^2.3.2", "phpunit/phpunit": "^5.7.14", - "squizlabs/php_codesniffer": "^1.5.6", + "squizlabs/php_codesniffer": "^3.4.0", "wyrihaximus/phpunit-class-reflection-helpers": "dev-master" }, "type": "cakephp-plugin", @@ -2950,7 +3763,11 @@ "twig", "view" ], - "time": "2018-07-03T15:46:29+00:00" + "support": { + "issues": "https://github.com/cakephp/legacy-twig-view/issues", + "source": "https://github.com/cakephp/legacy-twig-view/tree/4.4.0" + }, + "time": "2021-04-06T15:42:50+00:00" } ], "aliases": [], @@ -2963,5 +3780,6 @@ "platform": { "php": ">=5.6" }, - "platform-dev": [] + "platform-dev": [], + "plugin-api-version": "2.1.0" } diff --git a/app/vendor/adodb/adodb-php/.gitattributes b/app/vendor/adodb/adodb-php/.gitattributes deleted file mode 100644 index 2cb098d87..000000000 --- a/app/vendor/adodb/adodb-php/.gitattributes +++ /dev/null @@ -1,17 +0,0 @@ -# Default behavior -* text=auto - -# Text files to be normalized to lf line endings -*.php text -*.htm* text -*.sql text -*.txt text -*.xml text -*.xsl text - -# Windows-only files -*.bat eol=crlf - -# Binary files -*.gif binary - diff --git a/app/vendor/adodb/adodb-php/.gitignore b/app/vendor/adodb/adodb-php/.gitignore deleted file mode 100644 index 0d777b27e..000000000 --- a/app/vendor/adodb/adodb-php/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -# IDE/Editor temporary files -*~ -*.swp -*.bak -*.tmp -.project -.settings/ -/nbproject/ -.idea/ - diff --git a/app/vendor/adodb/adodb-php/.mailmap b/app/vendor/adodb/adodb-php/.mailmap deleted file mode 100644 index 1f2f7e7f0..000000000 --- a/app/vendor/adodb/adodb-php/.mailmap +++ /dev/null @@ -1,4 +0,0 @@ -Andreas Fernandez -Mike Benoit MikeB -Mike Benoit mike.benoit - diff --git a/app/vendor/adodb/adodb-php/LICENSE.md b/app/vendor/adodb/adodb-php/LICENSE.md index b8191587b..d00e2b1f2 100644 --- a/app/vendor/adodb/adodb-php/LICENSE.md +++ b/app/vendor/adodb/adodb-php/LICENSE.md @@ -1,19 +1,22 @@ ADOdb License ============= -ADOdb is dual licensed under BSD and LGPL. +The ADOdb Library is dual-licensed, released under both the +[BSD 3-clause](#bsd-3-clause-license) and the +[GNU Lesser General Public License (LGPL) v2.1](#gnu-lesser-general-public-license) +or, at your option, any later version. In plain English, you do not need to distribute your application in source code form, nor do you need to distribute ADOdb source code, provided you follow the rest of terms of the BSD license. -For more info about ADOdb, visit http://adodb.sourceforge.net/ +For more information about ADOdb, visit https://adodb.org/ BSD 3-Clause License -------------------- -(c) 2000-2013 John Lim (jlim@natsoft.com) -(c) 2014 Damien Regad, Mark Newnham and the ADOdb community +(c) 2000-2013 John Lim (jlim@natsoft.com) +(c) 2014 Damien Regad, Mark Newnham and the ADOdb community All rights reserved. Redistribution and use in source and binary forms, with or without modification, diff --git a/app/vendor/adodb/adodb-php/README.md b/app/vendor/adodb/adodb-php/README.md index 958cca56f..e432b2fb0 100644 --- a/app/vendor/adodb/adodb-php/README.md +++ b/app/vendor/adodb/adodb-php/README.md @@ -1,28 +1,22 @@ -ADOdb Library for PHP5 +ADOdb Library for PHP ====================== [![Join chat on Gitter](https://img.shields.io/gitter/room/form-data/form-data.svg)](https://gitter.im/adodb/adodb?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Download ADOdb](https://img.shields.io/sourceforge/dm/adodb.svg)](https://sourceforge.net/projects/adodb/files/latest/download) (c) 2000-2013 John Lim (jlim@natsoft.com) -(c) 2014 Damien Regad, Mark Newnham and the ADOdb community - -Released under both [BSD 3-Clause](https://github.com/ADOdb/ADOdb/blob/master/LICENSE.md#bsd-3-clause-license) -and [GNU Lesser GPL library 2.1](https://github.com/ADOdb/ADOdb/blob/master/LICENSE.md#gnu-lesser-general-public-license) -licenses. -This means you can use it in proprietary products; +(c) 2014 Damien Regad, Mark Newnham and the + [ADOdb community](https://github.com/ADOdb/ADOdb/graphs/contributors) + +The ADOdb Library is dual-licensed, released under both the +[BSD 3-Clause](https://github.com/ADOdb/ADOdb/blob/master/LICENSE.md#bsd-3-clause-license) +and the +[GNU Lesser General Public Licence (LGPL) v2.1](https://github.com/ADOdb/ADOdb/blob/master/LICENSE.md#gnu-lesser-general-public-license) +or, at your option, any later version. +This means you can use it in proprietary products; see [License](https://github.com/ADOdb/ADOdb/blob/master/LICENSE.md) for details. -Home page: http://adodb.org/ - -> **WARNING: known issue with Associative Fetch Mode in ADOdb v5.19 --- PLEASE UPGRADE TO v5.20 !** -> When fetching data in Associative mode (i.e. when `$ADODB_FETCH_MODE` is -> set to *ADODB_FETCH_ASSOC*), recordsets do not return any data (empty strings) -> when using some database drivers. The problem has been reported on MSSQL, -> Interbase and Foxpro, but possibly affects other drivers as well; all drivers -> derived from the above are also impacted. -> For further details, please refer to [Issue #20](https://github.com/ADOdb/ADOdb/issues/20). +Home page: https://adodb.org/ Introduction @@ -33,8 +27,8 @@ need for a database class library to hide the differences between the different databases (encapsulate the differences) so we can easily switch databases. -The library currently supports MySQL, Interbase, Sybase, PostgreSQL, Oracle, -Microsoft SQL server, Foxpro ODBC, Access ODBC, Informix, DB2, +The library currently supports MySQL, Firebird & Interbase, PostgreSQL, SQLite3, Oracle, +Microsoft SQL Server, Foxpro ODBC, Access ODBC, Informix, DB2, Sybase, Sybase SQL Anywhere, generic ODBC and Microsoft's ADO. We hope more people will contribute drivers to support other databases. @@ -54,12 +48,12 @@ You can debug using: debug = true; -$db->Connect($server, $user, $password, $database); -$rs = $db->Execute('select * from some_small_table'); +$db->connect($server, $user, $password, $database); +$rs = $db->execute('select * from some_small_table'); print "
";
-print_r($rs->GetRows());
+print_r($rs->getRows());
 print "
"; ``` @@ -67,14 +61,14 @@ print ""; Documentation and Examples ========================== -Refer to the [ADOdb website](http://adodb.org/) for library documentation and examples. The documentation can also be [downloaded for offline viewing](https://sourceforge.net/projects/adodb/files/Documentation/). +Refer to the [ADOdb website](https://adodb.org/) for library documentation and examples. The documentation can also be [downloaded for offline viewing](https://sourceforge.net/projects/adodb/files/Documentation/). -- [Main documentation](http://adodb.org/dokuwiki/doku.php?id=v5:userguide:userguide_index): Query, update and insert records using a portable API. -- [Data dictionary](http://adodb.org/dokuwiki/doku.php?id=v5:dictionary:dictionary_index) describes how to create database tables and indexes in a portable manner. -- [Database performance monitoring](http://adodb.org/dokuwiki/doku.php?id=v5:performance:performance_index) allows you to perform health checks, tune and monitor your database. -- [Database-backed sessions](http://adodb.org/dokuwiki/doku.php?id=v5:session:session_index). +- [Main documentation](https://adodb.org/dokuwiki/doku.php?id=v5:userguide:userguide_index): Query, update and insert records using a portable API. +- [Data dictionary](https://adodb.org/dokuwiki/doku.php?id=v5:dictionary:dictionary_index) describes how to create database tables and indexes in a portable manner. +- [Database performance monitoring](https://adodb.org/dokuwiki/doku.php?id=v5:performance:performance_index) allows you to perform health checks, tune and monitor your database. +- [Database-backed sessions](https://adodb.org/dokuwiki/doku.php?id=v5:session:session_index). -There is also a [tutorial](http://adodb.org/dokuwiki/doku.php?id=v5:userguide:mysql_tutorial) that contrasts ADOdb code with PHP native MySQL code. +There is also a [tutorial](https://adodb.org/dokuwiki/doku.php?id=v5:userguide:mysql_tutorial) that contrasts ADOdb code with PHP native MySQL code. Files @@ -102,7 +96,6 @@ https://github.com/ADOdb/ADOdb/issues You may also find legacy issues in -- the old [ADOdb forums](http://phplens.com/lens/lensforum/topics.php?id=4) on phplens.com - the [SourceForge tickets section](http://sourceforge.net/p/adodb/_list/tickets) However, please note that they are not actively monitored and should diff --git a/app/vendor/adodb/adodb-php/adodb-active-record.inc.php b/app/vendor/adodb/adodb-php/adodb-active-record.inc.php index a7f0adf7f..8f3b00538 100644 --- a/app/vendor/adodb/adodb-php/adodb-active-record.inc.php +++ b/app/vendor/adodb/adodb-php/adodb-active-record.inc.php @@ -1,23 +1,25 @@ $d) { - if (PHP_VERSION >= 5) { - if ($d->db === $db) { - return $k; - } - } else { - if ($d->db->_connectionID === $db->_connectionID && $db->database == $d->db->database) { - return $k; - } - } + foreach($_ADODB_ACTIVE_DBS as $k => $d) { + if($d->db === $db) { + return $k; } + } - $obj = new ADODB_Active_DB(); - $obj->db = $db; - $obj->tables = array(); + $obj = new ADODB_Active_DB(); + $obj->db = $db; + $obj->tables = array(); - if ($index == false) { - $index = sizeof($_ADODB_ACTIVE_DBS); - } + if ($index == false) { + $index = sizeof($_ADODB_ACTIVE_DBS); + } - $_ADODB_ACTIVE_DBS[$index] = $obj; + $_ADODB_ACTIVE_DBS[$index] = $obj; - return sizeof($_ADODB_ACTIVE_DBS)-1; + return sizeof($_ADODB_ACTIVE_DBS)-1; } class ADODB_Active_Record { static $_changeNames = true; // dynamically pluralize table names - static $_quoteNames = false; + + /** @var bool|string Allows override of global $ADODB_QUOTE_FIELDNAMES */ + public $_quoteNames; static $_foreignSuffix = '_id'; // var $_dbat; // associative index pointing to ADODB_Active_DB eg. $ADODB_Active_DBS[_dbat] @@ -120,7 +118,12 @@ public function __set($name, $value) // php5 constructor function __construct($table = false, $pkeyarr=false, $db=false) { - global $ADODB_ASSOC_CASE,$_ADODB_ACTIVE_DBS; + global $_ADODB_ACTIVE_DBS, $ADODB_QUOTE_FIELDNAMES; + + // Set the local override for field quoting, only if not defined yet + if (!isset($this->_quoteNames)) { + $this->_quoteNames = $ADODB_QUOTE_FIELDNAMES; + } if ($db == false && is_object($pkeyarr)) { $db = $pkeyarr; @@ -374,7 +377,7 @@ function LoadRelations($name, $whereOrderBy='', $offset=-1,$limit=-1) // update metadata function UpdateActiveTable($pkeys=false,$forceUpdate=false) { - global $ADODB_ASSOC_CASE,$_ADODB_ACTIVE_DBS , $ADODB_CACHE_DIR, $ADODB_ACTIVE_CACHESECS; + global $_ADODB_ACTIVE_DBS , $ADODB_CACHE_DIR, $ADODB_ACTIVE_CACHESECS; global $ADODB_ACTIVE_DEFVALS,$ADODB_FETCH_MODE; $activedb = $_ADODB_ACTIVE_DBS[$this->_dbat]; @@ -463,8 +466,8 @@ function UpdateActiveTable($pkeys=false,$forceUpdate=false) $attr = array(); $keys = array(); - switch($ADODB_ASSOC_CASE) { - case 0: + switch (ADODB_ASSOC_CASE) { + case ADODB_ASSOC_CASE_LOWER: foreach($cols as $name => $fldobj) { $name = strtolower($name); if ($ADODB_ACTIVE_DEFVALS && isset($fldobj->default_value)) { @@ -480,7 +483,7 @@ function UpdateActiveTable($pkeys=false,$forceUpdate=false) } break; - case 1: + case ADODB_ASSOC_CASE_UPPER: foreach($cols as $name => $fldobj) { $name = strtoupper($name); @@ -499,7 +502,6 @@ function UpdateActiveTable($pkeys=false,$forceUpdate=false) break; default: foreach($cols as $name => $fldobj) { - $name = ($fldobj->name); if ($ADODB_ACTIVE_DEFVALS && isset($fldobj->default_value)) { $this->$name = $fldobj->default_value; @@ -510,7 +512,7 @@ function UpdateActiveTable($pkeys=false,$forceUpdate=false) $attr[$name] = $fldobj; } foreach($pkeys as $k => $name) { - $keys[$name] = $cols[$name]->name; + $keys[$name] = $cols[strtoupper($name)]->name; } break; } @@ -522,7 +524,7 @@ function UpdateActiveTable($pkeys=false,$forceUpdate=false) $activetab->_created = time(); $s = serialize($activetab); if (!function_exists('adodb_write_file')) { - include(ADODB_DIR.'/adodb-csvlib.inc.php'); + include_once(ADODB_DIR.'/adodb-csvlib.inc.php'); } adodb_write_file($fname,$s); } @@ -700,9 +702,14 @@ function LastInsertID(&$db,$fieldname) $val = false; } - if (is_null($val) || $val === false) { + if (is_null($val) || $val === false) + { + $SQL = sprintf("SELECT MAX(%s) FROM %s", + $this->nameQuoter($db,$fieldname), + $this->nameQuoter($db,$this->_table) + ); // this might not work reliably in multi-user environment - return $db->GetOne("select max(".$fieldname.") from ".$this->_table); + return $db->GetOne($SQL); } return $val; } @@ -749,10 +756,11 @@ function GenWhere(&$db, &$table) foreach($keys as $k) { $f = $table->flds[$k]; if ($f) { - $parr[] = $k.' = '.$this->doquote($db,$this->$k,$db->MetaType($f->type)); + $columnName = $this->nameQuoter($db,$k); + $parr[] = $columnName.' = '.$this->doquote($db,$this->$k,$db->MetaType($f->type)); } } - return implode(' and ', $parr); + return implode(' AND ', $parr); } @@ -774,7 +782,7 @@ function _QName($n,$db=false) function Load($where=null,$bindarr=false, $lock = false) { - global $ADODB_FETCH_MODE; + global $ADODB_FETCH_MODE; $db = $this->DB(); if (!$db) { @@ -788,7 +796,9 @@ function Load($where=null,$bindarr=false, $lock = false) $savem = $db->SetFetchMode(false); } - $qry = "select * from ".$this->_table; + $qry = sprintf("SELECT * FROM %s", + $this->nameQuoter($db,$this->_table) + ); if($where) { $qry .= ' WHERE '.$where; @@ -813,7 +823,7 @@ function LoadLocked($where=null, $bindarr=false) } # useful for multiple record inserts - # see http://phplens.com/lens/lensforum/msgs.php?id=17795 + # see PHPLens Issue No: 17795 function Reset() { $this->_where=null; @@ -862,7 +872,7 @@ function Insert() $val = $this->$name; if(!is_array($val) || !is_null($val) || !array_key_exists($name, $table->keys)) { $valarr[] = $val; - $names[] = $this->_QName($name,$db); + $names[] = $this->nameQuoter($db,$name); $valstr[] = $db->Param($cnt); $cnt += 1; } @@ -871,12 +881,18 @@ function Insert() if (empty($names)){ foreach($table->flds as $name=>$fld) { $valarr[] = null; - $names[] = $name; + $names[] = $this->nameQuoter($db,$name); $valstr[] = $db->Param($cnt); $cnt += 1; } } - $sql = 'INSERT INTO '.$this->_table."(".implode(',',$names).') VALUES ('.implode(',',$valstr).')'; + + $tableName = $this->nameQuoter($db,$this->_table); + $sql = sprintf('INSERT INTO %s (%s) VALUES (%s)', + $tableName, + implode(',',$names), + implode(',',$valstr) + ); $ok = $db->Execute($sql,$valarr); if ($ok) { @@ -907,7 +923,14 @@ function Delete() $table = $this->TableInfo(); $where = $this->GenWhere($db,$table); - $sql = 'DELETE FROM '.$this->_table.' WHERE '.$where; + + $tableName = $this->nameQuoter($db,$this->_table); + + $sql = sprintf('DELETE FROM %s WHERE %s', + $tableName, + $where + ); + $ok = $db->Execute($sql); return $ok ? true : false; @@ -927,8 +950,6 @@ function Find($whereOrderBy,$bindarr=false,$pkeysArr=false,$extra=array()) // returns 0 on error, 1 on update, 2 on insert function Replace() { - global $ADODB_ASSOC_CASE; - $db = $this->DB(); if (!$db) { return false; @@ -968,17 +989,32 @@ function Replace() $pkey = array($pkey); } - if ($ADODB_ASSOC_CASE == 0) { - foreach($pkey as $k => $v) - $pkey[$k] = strtolower($v); - } - elseif ($ADODB_ASSOC_CASE == 1) { - foreach($pkey as $k => $v) { - $pkey[$k] = strtoupper($v); - } + switch (ADODB_ASSOC_CASE) { + case ADODB_ASSOC_CASE_LOWER: + foreach ($pkey as $k => $v) { + $pkey[$k] = strtolower($v); + } + break; + case ADODB_ASSOC_CASE_UPPER: + foreach ($pkey as $k => $v) { + $pkey[$k] = strtoupper($v); + } + break; } - $ok = $db->Replace($this->_table,$arr,$pkey); + $newArr = array(); + foreach($arr as $k=>$v) + $newArr[$this->nameQuoter($db,$k)] = $v; + $arr = $newArr; + + $newPkey = array(); + foreach($pkey as $k=>$v) + $newPkey[$k] = $this->nameQuoter($db,$v); + $pkey = $newPkey; + + $tableName = $this->nameQuoter($db,$this->_table); + + $ok = $db->Replace($tableName,$arr,$pkey); if ($ok) { $this->_saved = true; // 1= update 2=insert if ($ok == 2) { @@ -1050,7 +1086,7 @@ function Update() } $valarr[] = $val; - $pairs[] = $this->_QName($name,$db).'='.$db->Param($cnt); + $pairs[] = $this->nameQuoter($db,$name).'='.$db->Param($cnt); $cnt += 1; } @@ -1059,7 +1095,13 @@ function Update() return -1; } - $sql = 'UPDATE '.$this->_table." SET ".implode(",",$pairs)." WHERE ".$where; + $tableName = $this->nameQuoter($db,$this->_table); + + $sql = sprintf('UPDATE %s SET %s WHERE %s', + $tableName, + implode(',',$pairs), + $where); + $ok = $db->Execute($sql,$valarr); if ($ok) { $this->_original = $neworig; @@ -1077,6 +1119,31 @@ function GetAttributeNames() return array_keys($table->flds); } + /** + * Quotes the table, column and field names. + * + * This honours the internal {@see $_quoteNames} property, which overrides + * the global $ADODB_QUOTE_FIELDNAMES directive. + * + * @param ADOConnection $db The database connection + * @param string $name The table or column name to quote + * + * @return string The quoted name + */ + private function nameQuoter($db, $name) + { + global $ADODB_QUOTE_FIELDNAMES; + + $save = $ADODB_QUOTE_FIELDNAMES; + $ADODB_QUOTE_FIELDNAMES = $this->_quoteNames; + + $string = _adodb_quote_fieldname($db, $name); + + $ADODB_QUOTE_FIELDNAMES = $save; + + return $string; + } + }; function adodb_GetActiveRecordsClass(&$db, $class, $table,$whereOrderBy,$bindarr, $primkeyArr, @@ -1086,6 +1153,7 @@ function adodb_GetActiveRecordsClass(&$db, $class, $table,$whereOrderBy,$bindarr $save = $db->SetFetchMode(ADODB_FETCH_NUM); + $qry = "select * from ".$table; if (!empty($whereOrderBy)) { @@ -1124,7 +1192,7 @@ function adodb_GetActiveRecordsClass(&$db, $class, $table,$whereOrderBy,$bindarr // arrRef will be the structure that knows about our objects. // It is an associative array. // We will, however, return arr, preserving regular 0.. order so that - // obj[0] can be used by app developpers. + // obj[0] can be used by app developers. $arrRef = array(); $bTos = array(); // Will store belongTo's indices if any foreach($rows as $row) { diff --git a/app/vendor/adodb/adodb-php/adodb-active-recordx.inc.php b/app/vendor/adodb/adodb-php/adodb-active-recordx.inc.php index 7f553f1e0..5de5b1309 100644 --- a/app/vendor/adodb/adodb-php/adodb-active-recordx.inc.php +++ b/app/vendor/adodb/adodb-php/adodb-active-recordx.inc.php @@ -1,27 +1,27 @@ $d) { - if (PHP_VERSION >= 5) { - if ($d->db === $db) { - return $k; - } - } else { - if ($d->db->_connectionID === $db->_connectionID && $db->database == $d->db->database) { - return $k; - } - } + foreach($_ADODB_ACTIVE_DBS as $k => $d) { + if ($d->db === $db) { + return $k; } + } - $obj = new ADODB_Active_DB(); - $obj->db = $db; - $obj->tables = array(); + $obj = new ADODB_Active_DB(); + $obj->db = $db; + $obj->tables = array(); - $_ADODB_ACTIVE_DBS[] = $obj; + $_ADODB_ACTIVE_DBS[] = $obj; - return sizeof($_ADODB_ACTIVE_DBS)-1; + return sizeof($_ADODB_ACTIVE_DBS)-1; } @@ -137,7 +131,7 @@ public function __set($name, $value) // if $options['new'] is true, we forget all relations function __construct($table = false, $pkeyarr=false, $db=false, $options=array()) { - global $ADODB_ASSOC_CASE,$_ADODB_ACTIVE_DBS; + global $_ADODB_ACTIVE_DBS; if ($db == false && is_object($pkeyarr)) { $db = $pkeyarr; @@ -410,7 +404,7 @@ function LoadRelations($name, $whereOrderBy, $offset=-1, $limit=-1) // update metadata function UpdateActiveTable($pkeys=false,$forceUpdate=false) { - global $ADODB_ASSOC_CASE,$_ADODB_ACTIVE_DBS , $ADODB_CACHE_DIR, $ADODB_ACTIVE_CACHESECS; + global $_ADODB_ACTIVE_DBS , $ADODB_CACHE_DIR, $ADODB_ACTIVE_CACHESECS; global $ADODB_ACTIVE_DEFVALS, $ADODB_FETCH_MODE; $activedb = $_ADODB_ACTIVE_DBS[$this->_dbat]; @@ -491,8 +485,8 @@ function UpdateActiveTable($pkeys=false,$forceUpdate=false) $attr = array(); $keys = array(); - switch($ADODB_ASSOC_CASE) { - case 0: + switch (ADODB_ASSOC_CASE) { + case ADODB_ASSOC_CASE_LOWER: foreach($cols as $name => $fldobj) { $name = strtolower($name); if ($ADODB_ACTIVE_DEFVALS && isset($fldobj->default_value)) { @@ -508,7 +502,7 @@ function UpdateActiveTable($pkeys=false,$forceUpdate=false) } break; - case 1: + case ADODB_ASSOC_CASE_UPPER: foreach($cols as $name => $fldobj) { $name = strtoupper($name); @@ -551,7 +545,7 @@ function UpdateActiveTable($pkeys=false,$forceUpdate=false) $activetab->_created = time(); $s = serialize($activetab); if (!function_exists('adodb_write_file')) { - include(ADODB_DIR.'/adodb-csvlib.inc.php'); + include_once(ADODB_DIR.'/adodb-csvlib.inc.php'); } adodb_write_file($fname,$s); } @@ -1060,8 +1054,6 @@ function packageFind($whereOrderBy,$bindarr=false,$pkeysArr=false,$extra=array() // returns 0 on error, 1 on update, 2 on insert function Replace() { - global $ADODB_ASSOC_CASE; - $db = $this->DB(); if (!$db) { return false; @@ -1097,7 +1089,7 @@ function Replace() } - switch ($ADODB_ASSOC_CASE == 0) { + switch (ADODB_ASSOC_CASE) { case ADODB_ASSOC_CASE_LOWER: foreach($pkey as $k => $v) { $pkey[$k] = strtolower($v); @@ -1300,7 +1292,7 @@ function adodb_GetActiveRecordsClass(&$db, $class, $tableObj,$whereOrderBy,$bind if (!isset($_ADODB_ACTIVE_DBS)) { - include(ADODB_DIR.'/adodb-active-record.inc.php'); + include_once(ADODB_DIR.'/adodb-active-record.inc.php'); } if (!class_exists($class)) { $db->outp_throw("Unknown class $class in GetActiveRecordsClass()",'GetActiveRecordsClass'); @@ -1311,7 +1303,7 @@ function adodb_GetActiveRecordsClass(&$db, $class, $tableObj,$whereOrderBy,$bind // arrRef will be the structure that knows about our objects. // It is an associative array. // We will, however, return arr, preserving regular 0.. order so that - // obj[0] can be used by app developpers. + // obj[0] can be used by app developers. $arrRef = array(); $bTos = array(); // Will store belongTo's indices if any foreach($rows as $row) { diff --git a/app/vendor/adodb/adodb-php/adodb-csvlib.inc.php b/app/vendor/adodb/adodb-php/adodb-csvlib.inc.php index bfd8d9b87..c81254bfc 100644 --- a/app/vendor/adodb/adodb-php/adodb-csvlib.inc.php +++ b/app/vendor/adodb/adodb-php/adodb-csvlib.inc.php @@ -1,4 +1,26 @@ $str

"; -$a= Lens_ParseArgs($str); +$a= lens_ParseArgs($str); print "
";
 print_r($a);
 print "
"; @@ -53,7 +56,7 @@ function ctype_alnum($text) { @param tokenchars Include the following characters in tokens apart from A-Z and 0-9 @returns 2 dimensional array containing parsed tokens. */ -function Lens_ParseArgs($args,$endstmtchar=',',$tokenchars='_.-') +function lens_ParseArgs($args,$endstmtchar=',',$tokenchars='_.-') { $pos = 0; $intoken = false; @@ -164,6 +167,7 @@ function Lens_ParseArgs($args,$endstmtchar=',',$tokenchars='_.-') class ADODB_DataDict { + /** @var ADOConnection */ var $connection; var $debug = false; var $dropTable = 'DROP TABLE %s'; @@ -179,45 +183,60 @@ class ADODB_DataDict { var $serverInfo = array(); var $autoIncrement = false; var $dataProvider; - var $invalidResizeTypes4 = array('CLOB','BLOB','TEXT','DATE','TIME'); // for changetablesql + var $invalidResizeTypes4 = array('CLOB','BLOB','TEXT','DATE','TIME'); // for changeTableSQL var $blobSize = 100; /// any varchar/char field this size or greater is treated as a blob - /// in other words, we use a text area for editting. + /// in other words, we use a text area for editing. + /** @var string Uppercase driver name */ + var $upperName; + + /* + * Indicates whether a BLOB/CLOB field will allow a NOT NULL setting + * The type is whatever is matched to an X or X2 or B type. We must + * explicitly set the value in the driver to switch the behaviour on + */ + public $blobAllowsNotNull; + /* + * Indicates whether a BLOB/CLOB field will allow a DEFAULT set + * The type is whatever is matched to an X or X2 or B type. We must + * explicitly set the value in the driver to switch the behaviour on + */ + public $blobAllowsDefaultValue; - function GetCommentSQL($table,$col) + function getCommentSQL($table,$col) { return false; } - function SetCommentSQL($table,$col,$cmt) + function setCommentSQL($table,$col,$cmt) { return false; } - function MetaTables() + function metaTables() { - if (!$this->connection->IsConnected()) return array(); - return $this->connection->MetaTables(); + if (!$this->connection->isConnected()) return array(); + return $this->connection->metaTables(); } - function MetaColumns($tab, $upper=true, $schema=false) + function metaColumns($tab, $upper=true, $schema=false) { - if (!$this->connection->IsConnected()) return array(); - return $this->connection->MetaColumns($this->TableName($tab), $upper, $schema); + if (!$this->connection->isConnected()) return array(); + return $this->connection->metaColumns($this->tableName($tab), $upper, $schema); } - function MetaPrimaryKeys($tab,$owner=false,$intkey=false) + function metaPrimaryKeys($tab,$owner=false,$intkey=false) { - if (!$this->connection->IsConnected()) return array(); - return $this->connection->MetaPrimaryKeys($this->TableName($tab), $owner, $intkey); + if (!$this->connection->isConnected()) return array(); + return $this->connection->metaPrimaryKeys($this->tableName($tab), $owner, $intkey); } - function MetaIndexes($table, $primary = false, $owner = false) + function metaIndexes($table, $primary = false, $owner = false) { - if (!$this->connection->IsConnected()) return array(); - return $this->connection->MetaIndexes($this->TableName($table), $primary, $owner); + if (!$this->connection->isConnected()) return array(); + return $this->connection->metaIndexes($this->tableName($table), $primary, $owner); } - function MetaType($t,$len=-1,$fieldobj=false) + function metaType($t,$len=-1,$fieldobj=false) { static $typeMap = array( 'VARCHAR' => 'C', @@ -323,15 +342,15 @@ function MetaType($t,$len=-1,$fieldobj=false) "SQLBOOL" => 'L' ); - if (!$this->connection->IsConnected()) { + if (!$this->connection->isConnected()) { $t = strtoupper($t); if (isset($typeMap[$t])) return $typeMap[$t]; - return 'N'; + return ADODB_DEFAULT_METATYPE; } - return $this->connection->MetaType($t,$len,$fieldobj); + return $this->connection->metaType($t,$len,$fieldobj); } - function NameQuote($name = NULL,$allowBrackets=false) + function nameQuote($name = NULL,$allowBrackets=false) { if (!is_string($name)) { return FALSE; @@ -360,16 +379,16 @@ function NameQuote($name = NULL,$allowBrackets=false) return $name; } - function TableName($name) + function tableName($name) { if ( $this->schema ) { - return $this->NameQuote($this->schema) .'.'. $this->NameQuote($name); + return $this->nameQuote($this->schema) .'.'. $this->nameQuote($name); } - return $this->NameQuote($name); + return $this->nameQuote($name); } - // Executes the sql array returned by GetTableSQL and GetIndexSQL - function ExecuteSQLArray($sql, $continueOnError = true) + // Executes the sql array returned by getTableSQL and getIndexSQL + function executeSQLArray($sql, $continueOnError = true) { $rez = 2; $conn = $this->connection; @@ -377,10 +396,10 @@ function ExecuteSQLArray($sql, $continueOnError = true) foreach($sql as $line) { if ($this->debug) $conn->debug = true; - $ok = $conn->Execute($line); + $ok = $conn->execute($line); $conn->debug = $saved; if (!$ok) { - if ($this->debug) ADOConnection::outp($conn->ErrorMsg()); + if ($this->debug) ADOConnection::outp($conn->errorMsg()); if (!$continueOnError) return 0; $rez = 1; } @@ -406,17 +425,17 @@ function ExecuteSQLArray($sql, $continueOnError = true) N: Numeric or decimal number */ - function ActualType($meta) + function actualType($meta) { return $meta; } - function CreateDatabase($dbname,$options=false) + function createDatabase($dbname,$options=false) { - $options = $this->_Options($options); + $options = $this->_options($options); $sql = array(); - $s = 'CREATE DATABASE ' . $this->NameQuote($dbname); + $s = 'CREATE DATABASE ' . $this->nameQuote($dbname); if (isset($options[$this->upperName])) $s .= ' '.$options[$this->upperName]; @@ -427,7 +446,7 @@ function CreateDatabase($dbname,$options=false) /* Generates the SQL to create index. Returns an array of sql strings. */ - function CreateIndexSQL($idxname, $tabname, $flds, $idxoptions = false) + function createIndexSQL($idxname, $tabname, $flds, $idxoptions = false) { if (!is_array($flds)) { $flds = explode(',',$flds); @@ -435,27 +454,27 @@ function CreateIndexSQL($idxname, $tabname, $flds, $idxoptions = false) foreach($flds as $key => $fld) { # some indexes can use partial fields, eg. index first 32 chars of "name" with NAME(32) - $flds[$key] = $this->NameQuote($fld,$allowBrackets=true); + $flds[$key] = $this->nameQuote($fld,$allowBrackets=true); } - return $this->_IndexSQL($this->NameQuote($idxname), $this->TableName($tabname), $flds, $this->_Options($idxoptions)); + return $this->_indexSQL($this->nameQuote($idxname), $this->tableName($tabname), $flds, $this->_options($idxoptions)); } - function DropIndexSQL ($idxname, $tabname = NULL) + function dropIndexSQL ($idxname, $tabname = NULL) { - return array(sprintf($this->dropIndex, $this->NameQuote($idxname), $this->TableName($tabname))); + return array(sprintf($this->dropIndex, $this->nameQuote($idxname), $this->tableName($tabname))); } - function SetSchema($schema) + function setSchema($schema) { $this->schema = $schema; } - function AddColumnSQL($tabname, $flds) + function addColumnSQL($tabname, $flds) { - $tabname = $this->TableName ($tabname); + $tabname = $this->tableName($tabname); $sql = array(); - list($lines,$pkey,$idxs) = $this->_GenFields($flds); + list($lines,$pkey,$idxs) = $this->_genFields($flds); // genfields can return FALSE at times if ($lines == null) $lines = array(); $alter = 'ALTER TABLE ' . $tabname . $this->addCol . ' '; @@ -464,7 +483,7 @@ function AddColumnSQL($tabname, $flds) } if (is_array($idxs)) { foreach($idxs as $idx => $idxdef) { - $sql_idxs = $this->CreateIndexSql($idx, $tabname, $idxdef['cols'], $idxdef['opts']); + $sql_idxs = $this->createIndexSql($idx, $tabname, $idxdef['cols'], $idxdef['opts']); $sql = array_merge($sql, $sql_idxs); } } @@ -474,19 +493,19 @@ function AddColumnSQL($tabname, $flds) /** * Change the definition of one column * - * As some DBM's can't do that on there own, you need to supply the complete defintion of the new table, - * to allow, recreating the table and copying the content over to the new table + * As some DBMs can't do that on their own, you need to supply the complete definition of the new table, + * to allow recreating the table and copying the content over to the new table * @param string $tabname table-name * @param string $flds column-name and type for the changed column - * @param string $tableflds='' complete defintion of the new table, eg. for postgres, default '' - * @param array/string $tableoptions='' options for the new table see CreateTableSQL, default '' + * @param string $tableflds='' complete definition of the new table, eg. for postgres, default '' + * @param array/string $tableoptions='' options for the new table see createTableSQL, default '' * @return array with SQL strings */ - function AlterColumnSQL($tabname, $flds, $tableflds='',$tableoptions='') + function alterColumnSQL($tabname, $flds, $tableflds='',$tableoptions='') { - $tabname = $this->TableName ($tabname); + $tabname = $this->tableName($tabname); $sql = array(); - list($lines,$pkey,$idxs) = $this->_GenFields($flds); + list($lines,$pkey,$idxs) = $this->_genFields($flds); // genfields can return FALSE at times if ($lines == null) $lines = array(); $alter = 'ALTER TABLE ' . $tabname . $this->alterCol . ' '; @@ -495,7 +514,7 @@ function AlterColumnSQL($tabname, $flds, $tableflds='',$tableoptions='') } if (is_array($idxs)) { foreach($idxs as $idx => $idxdef) { - $sql_idxs = $this->CreateIndexSql($idx, $tabname, $idxdef['cols'], $idxdef['opts']); + $sql_idxs = $this->createIndexSql($idx, $tabname, $idxdef['cols'], $idxdef['opts']); $sql = array_merge($sql, $sql_idxs); } @@ -506,71 +525,71 @@ function AlterColumnSQL($tabname, $flds, $tableflds='',$tableoptions='') /** * Rename one column * - * Some DBM's can only do this together with changeing the type of the column (even if that stays the same, eg. mysql) + * Some DBMs can only do this together with changeing the type of the column (even if that stays the same, eg. mysql) * @param string $tabname table-name * @param string $oldcolumn column-name to be renamed * @param string $newcolumn new column-name - * @param string $flds='' complete column-defintion-string like for AddColumnSQL, only used by mysql atm., default='' + * @param string $flds='' complete column-definition-string like for addColumnSQL, only used by mysql atm., default='' * @return array with SQL strings */ - function RenameColumnSQL($tabname,$oldcolumn,$newcolumn,$flds='') + function renameColumnSQL($tabname,$oldcolumn,$newcolumn,$flds='') { - $tabname = $this->TableName ($tabname); + $tabname = $this->tableName($tabname); if ($flds) { - list($lines,$pkey,$idxs) = $this->_GenFields($flds); + list($lines,$pkey,$idxs) = $this->_genFields($flds); // genfields can return FALSE at times if ($lines == null) $lines = array(); - list(,$first) = each($lines); + $first = current($lines); list(,$column_def) = preg_split("/[\t ]+/",$first,2); } - return array(sprintf($this->renameColumn,$tabname,$this->NameQuote($oldcolumn),$this->NameQuote($newcolumn),$column_def)); + return array(sprintf($this->renameColumn,$tabname,$this->nameQuote($oldcolumn),$this->nameQuote($newcolumn),$column_def)); } /** * Drop one column * - * Some DBM's can't do that on there own, you need to supply the complete defintion of the new table, + * Some DBM's can't do that on their own, you need to supply the complete definition of the new table, * to allow, recreating the table and copying the content over to the new table * @param string $tabname table-name * @param string $flds column-name and type for the changed column - * @param string $tableflds='' complete defintion of the new table, eg. for postgres, default '' - * @param array/string $tableoptions='' options for the new table see CreateTableSQL, default '' + * @param string $tableflds='' complete definition of the new table, eg. for postgres, default '' + * @param array/string $tableoptions='' options for the new table see createTableSQL, default '' * @return array with SQL strings */ - function DropColumnSQL($tabname, $flds, $tableflds='',$tableoptions='') + function dropColumnSQL($tabname, $flds, $tableflds='',$tableoptions='') { - $tabname = $this->TableName ($tabname); + $tabname = $this->tableName($tabname); if (!is_array($flds)) $flds = explode(',',$flds); $sql = array(); $alter = 'ALTER TABLE ' . $tabname . $this->dropCol . ' '; foreach($flds as $v) { - $sql[] = $alter . $this->NameQuote($v); + $sql[] = $alter . $this->nameQuote($v); } return $sql; } - function DropTableSQL($tabname) + function dropTableSQL($tabname) { - return array (sprintf($this->dropTable, $this->TableName($tabname))); + return array (sprintf($this->dropTable, $this->tableName($tabname))); } - function RenameTableSQL($tabname,$newname) + function renameTableSQL($tabname,$newname) { - return array (sprintf($this->renameTable, $this->TableName($tabname),$this->TableName($newname))); + return array (sprintf($this->renameTable, $this->tableName($tabname),$this->tableName($newname))); } /** Generate the SQL to create table. Returns an array of sql strings. */ - function CreateTableSQL($tabname, $flds, $tableoptions=array()) + function createTableSQL($tabname, $flds, $tableoptions=array()) { - list($lines,$pkey,$idxs) = $this->_GenFields($flds, true); + list($lines,$pkey,$idxs) = $this->_genFields($flds, true); // genfields can return FALSE at times if ($lines == null) $lines = array(); - $taboptions = $this->_Options($tableoptions); - $tabname = $this->TableName ($tabname); - $sql = $this->_TableSQL($tabname,$lines,$pkey,$taboptions); + $taboptions = $this->_options($tableoptions); + $tabname = $this->tableName($tabname); + $sql = $this->_tableSQL($tabname,$lines,$pkey,$taboptions); // ggiunta - 2006/10/12 - KLUDGE: // if we are on autoincrement, and table options includes REPLACE, the @@ -579,12 +598,12 @@ function CreateTableSQL($tabname, $flds, $tableoptions=array()) // creating sql that double-drops the sequence if ($this->autoIncrement && isset($taboptions['REPLACE'])) unset($taboptions['REPLACE']); - $tsql = $this->_Triggers($tabname,$taboptions); + $tsql = $this->_triggers($tabname,$taboptions); foreach($tsql as $s) $sql[] = $s; if (is_array($idxs)) { foreach($idxs as $idx => $idxdef) { - $sql_idxs = $this->CreateIndexSql($idx, $tabname, $idxdef['cols'], $idxdef['opts']); + $sql_idxs = $this->createIndexSql($idx, $tabname, $idxdef['cols'], $idxdef['opts']); $sql = array_merge($sql, $sql_idxs); } } @@ -594,13 +613,13 @@ function CreateTableSQL($tabname, $flds, $tableoptions=array()) - function _GenFields($flds,$widespacing=false) + function _genFields($flds,$widespacing=false) { if (is_string($flds)) { $padding = ' '; $txt = $flds.$padding; $flds = array(); - $flds0 = Lens_ParseArgs($txt,','); + $flds0 = lens_ParseArgs($txt,','); $hasparam = false; foreach($flds0 as $f0) { $f1 = array(); @@ -643,8 +662,8 @@ function _GenFields($flds,$widespacing=false) $pkey = array(); $idxs = array(); foreach($flds as $fld) { - $fld = _array_change_key_case($fld); - + if (is_array($fld)) + $fld = array_change_key_case($fld,CASE_UPPER); $fname = false; $fdefault = false; $fautoinc = false; @@ -660,18 +679,23 @@ function _GenFields($flds,$widespacing=false) $funsigned = false; $findex = ''; $funiqueindex = false; + $fOptions = array(); //----------------- // Parse attributes foreach($fld as $attr => $v) { - if ($attr == 2 && is_numeric($v)) $attr = 'SIZE'; - else if (is_numeric($attr) && $attr > 1 && !is_numeric($v)) $attr = strtoupper($v); + if ($attr == 2 && is_numeric($v)) + $attr = 'SIZE'; + elseif ($attr == 2 && strtoupper($ftype) == 'ENUM') + $attr = 'ENUM'; + else if (is_numeric($attr) && $attr > 1 && !is_numeric($v)) + $attr = strtoupper($v); switch($attr) { case '0': case 'NAME': $fname = $v; break; case '1': - case 'TYPE': $ty = $v; $ftype = $this->ActualType(strtoupper($v)); break; + case 'TYPE': $ty = $v; $ftype = $this->actualType(strtoupper($v)); break; case 'SIZE': $dotat = strpos($v,'.'); if ($dotat === false) $dotat = strpos($v,','); @@ -697,6 +721,8 @@ function _GenFields($flds,$widespacing=false) // let INDEX keyword create a 'very standard' index on column case 'INDEX': $findex = $v; break; case 'UNIQUE': $funiqueindex = true; break; + case 'ENUM': + $fOptions['ENUM'] = $v; break; } //switch } // foreach $fld @@ -708,7 +734,7 @@ function _GenFields($flds,$widespacing=false) } $fid = strtoupper(preg_replace('/^`(.+)`$/', '$1', $fname)); - $fname = $this->NameQuote($fname); + $fname = $this->nameQuote($fname); if (!strlen($ftype)) { if ($this->debug) ADOConnection::outp("Undefined TYPE for field '$fname'"); @@ -717,14 +743,24 @@ function _GenFields($flds,$widespacing=false) $ftype = strtoupper($ftype); } - $ftype = $this->_GetSize($ftype, $ty, $fsize, $fprec); + $ftype = $this->_getSize($ftype, $ty, $fsize, $fprec, $fOptions); - if ($ty == 'X' || $ty == 'X2' || $ty == 'B') $fnotnull = false; // some blob types do not accept nulls + if (($ty == 'X' || $ty == 'X2' || $ty == 'XL' || $ty == 'B') && !$this->blobAllowsNotNull) + /* + * some blob types do not accept nulls, so we override the + * previously defined value + */ + $fnotnull = false; - if ($fprimary) $pkey[] = $fname; + if ($fprimary) + $pkey[] = $fname; - // some databases do not allow blobs to have defaults - if ($ty == 'X') $fdefault = false; + if (($ty == 'X' || $ty == 'X2' || $ty == 'XL' || $ty == 'B') && !$this->blobAllowsDefaultValue) + /* + * some databases do not allow blobs to have defaults, so we + * override the previously defined value + */ + $fdefault = false; // build list of indexes if ($findex != '') { @@ -769,11 +805,11 @@ function _GenFields($flds,$widespacing=false) // convert default date into database-aware code if ($ty == 'T') { - $fdefault = $this->connection->DBTimeStamp($fdefault); + $fdefault = $this->connection->dbTimeStamp($fdefault); } else { - $fdefault = $this->connection->DBDate($fdefault); + $fdefault = $this->connection->dbDate($fdefault); } } else @@ -783,7 +819,7 @@ function _GenFields($flds,$widespacing=false) $fdefault = $this->connection->qstr($fdefault); } } - $suffix = $this->_CreateSuffix($fname,$ftype,$fnotnull,$fdefault,$fautoinc,$fconstraint,$funsigned); + $suffix = $this->_createSuffix($fname,$ftype,$fnotnull,$fdefault,$fautoinc,$fconstraint,$funsigned); // add index creation if ($widespacing) $fname = str_pad($fname,24); @@ -806,19 +842,38 @@ function _GenFields($flds,$widespacing=false) $ftype is the actual type $ty is the type defined originally in the DDL */ - function _GetSize($ftype, $ty, $fsize, $fprec) + function _getSize($ftype, $ty, $fsize, $fprec, $options=false) { if (strlen($fsize) && $ty != 'X' && $ty != 'B' && strpos($ftype,'(') === false) { $ftype .= "(".$fsize; if (strlen($fprec)) $ftype .= ",".$fprec; $ftype .= ')'; } + + /* + * Handle additional options + */ + if (is_array($options)) + { + foreach($options as $type=>$value) + { + switch ($type) + { + case 'ENUM': + $ftype .= '(' . $value . ')'; + break; + + default: + } + } + } + return $ftype; } // return string must begin with space - function _CreateSuffix($fname,&$ftype,$fnotnull,$fdefault,$fautoinc,$fconstraint,$funsigned) + function _createSuffix($fname,&$ftype,$fnotnull,$fdefault,$fautoinc,$fconstraint,$funsigned) { $suffix = ''; if (strlen($fdefault)) $suffix .= " DEFAULT $fdefault"; @@ -827,7 +882,7 @@ function _CreateSuffix($fname,&$ftype,$fnotnull,$fdefault,$fautoinc,$fconstraint return $suffix; } - function _IndexSQL($idxname, $tabname, $flds, $idxoptions) + function _indexSQL($idxname, $tabname, $flds, $idxoptions) { $sql = array(); @@ -856,25 +911,26 @@ function _IndexSQL($idxname, $tabname, $flds, $idxoptions) return $sql; } - function _DropAutoIncrement($tabname) + function _dropAutoIncrement($tabname) { return false; } - function _TableSQL($tabname,$lines,$pkey,$tableoptions) + function _tableSQL($tabname,$lines,$pkey,$tableoptions) { $sql = array(); if (isset($tableoptions['REPLACE']) || isset ($tableoptions['DROP'])) { $sql[] = sprintf($this->dropTable,$tabname); if ($this->autoIncrement) { - $sInc = $this->_DropAutoIncrement($tabname); + $sInc = $this->_dropAutoIncrement($tabname); if ($sInc) $sql[] = $sInc; } if ( isset ($tableoptions['DROP']) ) { return $sql; } } + $s = "CREATE TABLE $tabname (\n"; $s .= implode(",\n", $lines); if (sizeof($pkey)>0) { @@ -898,7 +954,7 @@ function _TableSQL($tabname,$lines,$pkey,$tableoptions) GENERATE TRIGGERS IF NEEDED used when table has auto-incrementing field that is emulated using triggers */ - function _Triggers($tabname,$taboptions) + function _triggers($tabname,$taboptions) { return array(); } @@ -906,7 +962,7 @@ function _Triggers($tabname,$taboptions) /** Sanitize options, so that array elements with no keys are promoted to keys */ - function _Options($opts) + function _options($opts) { if (!is_array($opts)) return array(); $newopts = array(); @@ -938,25 +994,25 @@ function _getSizePrec($size) This function changes/adds new fields to your table. You don't have to know if the col is new or not. It will check on its own. */ - function ChangeTableSQL($tablename, $flds, $tableoptions = false, $dropOldFlds=false) + function changeTableSQL($tablename, $flds, $tableoptions = false, $dropOldFlds=false) { global $ADODB_FETCH_MODE; $save = $ADODB_FETCH_MODE; $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; - if ($this->connection->fetchMode !== false) $savem = $this->connection->SetFetchMode(false); + if ($this->connection->fetchMode !== false) $savem = $this->connection->setFetchMode(false); // check table exists $save_handler = $this->connection->raiseErrorFn; $this->connection->raiseErrorFn = ''; - $cols = $this->MetaColumns($tablename); + $cols = $this->metaColumns($tablename); $this->connection->raiseErrorFn = $save_handler; - if (isset($savem)) $this->connection->SetFetchMode($savem); + if (isset($savem)) $this->connection->setFetchMode($savem); $ADODB_FETCH_MODE = $save; if ( empty($cols)) { - return $this->CreateTableSQL($tablename, $flds, $tableoptions); + return $this->createTableSQL($tablename, $flds, $tableoptions); } if (is_array($flds)) { @@ -976,7 +1032,7 @@ function ChangeTableSQL($tablename, $flds, $tableoptions = false, $dropOldFlds=f $c = $cols[$k]; $ml = $c->max_length; - $mt = $this->MetaType($c->type,$ml); + $mt = $this->metaType($c->type,$ml); if (isset($c->scale)) $sc = $c->scale; else $sc = 99; // always force change if scale not known. @@ -998,16 +1054,16 @@ function ChangeTableSQL($tablename, $flds, $tableoptions = false, $dropOldFlds=f // already exists, alter table instead - list($lines,$pkey,$idxs) = $this->_GenFields($flds); + list($lines,$pkey,$idxs) = $this->_genFields($flds); // genfields can return FALSE at times if ($lines == null) $lines = array(); - $alter = 'ALTER TABLE ' . $this->TableName($tablename); + $alter = 'ALTER TABLE ' . $this->tableName($tablename); $sql = array(); foreach ( $lines as $id => $v ) { if ( isset($cols[$id]) && is_object($cols[$id]) ) { - $flds = Lens_ParseArgs($v,','); + $flds = lens_ParseArgs($v,','); // We are trying to change the size of the field, if not allowed, simply ignore the request. // $flds[1] holds the type, $flds[2] holds the size -postnuke addition diff --git a/app/vendor/adodb/adodb-php/adodb-error.inc.php b/app/vendor/adodb/adodb-php/adodb-error.inc.php index d42a06a83..517cf9b01 100644 --- a/app/vendor/adodb/adodb-php/adodb-error.inc.php +++ b/app/vendor/adodb/adodb-php/adodb-error.inc.php @@ -1,19 +1,27 @@ DB_ERROR_SERIALIZATION_FAILURE ); reset($error_regexps); - while (list($regexp,$code) = each($error_regexps)) { + foreach ($error_regexps as $regexp => $code) { if (preg_match("/$regexp/mi", $errormsg)) { return $code; } @@ -245,9 +257,9 @@ function adodb_error_mysql() 1006 => DB_ERROR_CANNOT_CREATE, 1007 => DB_ERROR_ALREADY_EXISTS, 1008 => DB_ERROR_CANNOT_DROP, - 1045 => DB_ERROR_ACCESS_VIOLATION, + 1045 => DB_ERROR_ACCESS_VIOLATION, 1046 => DB_ERROR_NODBSELECTED, - 1049 => DB_ERROR_NOSUCHDB, + 1049 => DB_ERROR_NOSUCHDB, 1050 => DB_ERROR_ALREADY_EXISTS, 1051 => DB_ERROR_NOSUCHTABLE, 1054 => DB_ERROR_NOSUCHFIELD, @@ -257,8 +269,8 @@ function adodb_error_mysql() 1136 => DB_ERROR_VALUE_COUNT_ON_ROW, 1146 => DB_ERROR_NOSUCHTABLE, 1048 => DB_ERROR_CONSTRAINT, - 2002 => DB_ERROR_CONNECT_FAILED, - 2005 => DB_ERROR_CONNECT_FAILED + 2002 => DB_ERROR_CONNECT_FAILED, + 2005 => DB_ERROR_CONNECT_FAILED ); return $MAP; diff --git a/app/vendor/adodb/adodb-php/adodb-errorhandler.inc.php b/app/vendor/adodb/adodb-php/adodb-errorhandler.inc.php index 7f36ba1ee..0cd3f218b 100644 --- a/app/vendor/adodb/adodb-php/adodb-errorhandler.inc.php +++ b/app/vendor/adodb/adodb-php/adodb-errorhandler.inc.php @@ -1,18 +1,23 @@ Execute("select * from adoxyz"); - foreach($rs as $k => $v) { - echo $k; print_r($v); echo "
"; - } - - - Iterator code based on http://cvs.php.net/cvs.php/php-src/ext/spl/examples/cachingiterator.inc?login=2 - - - Moved to adodb.inc.php to improve performance. - */ diff --git a/app/vendor/adodb/adodb-php/adodb-lib.inc.php b/app/vendor/adodb/adodb-php/adodb-lib.inc.php index 60285305f..ced5e1261 100644 --- a/app/vendor/adodb/adodb-php/adodb-lib.inc.php +++ b/app/vendor/adodb/adodb-php/adodb-lib.inc.php @@ -1,25 +1,40 @@ array_pop($tmp)]; + } if ($arr) if (strpos($arr[1], '(') !== false) { $at = strpos($sql, $arr[1]); @@ -39,6 +54,7 @@ function adodb_strip_order_by($sql) } else { $sql = str_replace($arr[1], '', $sql); } + return $sql; } @@ -118,272 +134,259 @@ function adodb_transpose(&$arr, &$newarr, &$hdr, &$fobjs) } } -// Force key to upper. -// See also http://www.php.net/manual/en/function.array-change-key-case.php -function _array_change_key_case($an_array) -{ - if (is_array($an_array)) { - $new_array = array(); - foreach($an_array as $key=>$value) - $new_array[strtoupper($key)] = $value; - - return $new_array; - } - - return $an_array; -} function _adodb_replace(&$zthis, $table, $fieldArray, $keyCol, $autoQuote, $has_autoinc) { - if (count($fieldArray) == 0) return 0; - $first = true; - $uSet = ''; - - if (!is_array($keyCol)) { - $keyCol = array($keyCol); - } - foreach($fieldArray as $k => $v) { - if ($v === null) { - $v = 'NULL'; - $fieldArray[$k] = $v; - } else if ($autoQuote && /*!is_numeric($v) /*and strncmp($v,"'",1) !== 0 -- sql injection risk*/ strcasecmp($v,$zthis->null2null)!=0) { - $v = $zthis->qstr($v); - $fieldArray[$k] = $v; - } - if (in_array($k,$keyCol)) continue; // skip UPDATE if is key + // Add Quote around table name to support use of spaces / reserved keywords + $table=sprintf('%s%s%s', $zthis->nameQuote,$table,$zthis->nameQuote); - if ($first) { - $first = false; - $uSet = "$k=$v"; - } else - $uSet .= ",$k=$v"; - } + if (count($fieldArray) == 0) return 0; - $where = false; - foreach ($keyCol as $v) { - if (isset($fieldArray[$v])) { - if ($where) $where .= ' and '.$v.'='.$fieldArray[$v]; - else $where = $v.'='.$fieldArray[$v]; - } + if (!is_array($keyCol)) { + $keyCol = array($keyCol); + } + $uSet = ''; + foreach($fieldArray as $k => $v) { + if ($v === null) { + $v = 'NULL'; + $fieldArray[$k] = $v; + } else if ($autoQuote && /*!is_numeric($v) /*and strncmp($v,"'",1) !== 0 -- sql injection risk*/ strcasecmp($v,$zthis->null2null)!=0) { + $v = $zthis->qstr($v); + $fieldArray[$k] = $v; } + if (in_array($k,$keyCol)) continue; // skip UPDATE if is key - if ($uSet && $where) { - $update = "UPDATE $table SET $uSet WHERE $where"; + // Add Quote around column name to support use of spaces / reserved keywords + $uSet .= sprintf(',%s%s%s=%s',$zthis->nameQuote,$k,$zthis->nameQuote,$v); + } + $uSet = ltrim($uSet, ','); - $rs = $zthis->Execute($update); + // Add Quote around column name in where clause + $where = ''; + foreach ($keyCol as $v) { + if (isset($fieldArray[$v])) { + $where .= sprintf(' and %s%s%s=%s ', $zthis->nameQuote,$v,$zthis->nameQuote,$fieldArray[$v]); + } + } + if ($where) { + $where = substr($where, 5); + } + if ($uSet && $where) { + $update = "UPDATE $table SET $uSet WHERE $where"; + $rs = $zthis->Execute($update); - if ($rs) { - if ($zthis->poorAffectedRows) { - /* - The Select count(*) wipes out any errors that the update would have returned. - http://phplens.com/lens/lensforum/msgs.php?id=5696 - */ - if ($zthis->ErrorNo()<>0) return 0; + if ($rs) { + if ($zthis->poorAffectedRows) { + // The Select count(*) wipes out any errors that the update would have returned. + // PHPLens Issue No: 5696 + if ($zthis->ErrorNo()<>0) return 0; - # affected_rows == 0 if update field values identical to old values - # for mysql - which is silly. + // affected_rows == 0 if update field values identical to old values + // for mysql - which is silly. + $cnt = $zthis->GetOne("select count(*) from $table where $where"); + if ($cnt > 0) return 1; // record already exists + } else { + if (($zthis->Affected_Rows()>0)) return 1; + } + } else + return 0; + } - $cnt = $zthis->GetOne("select count(*) from $table where $where"); - if ($cnt > 0) return 1; // record already exists - } else { - if (($zthis->Affected_Rows()>0)) return 1; - } - } else - return 0; - } + $iCols = $iVals = ''; + foreach($fieldArray as $k => $v) { + if ($has_autoinc && in_array($k,$keyCol)) continue; // skip autoinc col - // print "

Error=".$this->ErrorNo().'

'; - $first = true; - foreach($fieldArray as $k => $v) { - if ($has_autoinc && in_array($k,$keyCol)) continue; // skip autoinc col + // Add Quote around Column Name + $iCols .= sprintf(',%s%s%s',$zthis->nameQuote,$k,$zthis->nameQuote); + $iVals .= ",$v"; + } + $iCols = ltrim($iCols, ','); + $iVals = ltrim($iVals, ','); - if ($first) { - $first = false; - $iCols = "$k"; - $iVals = "$v"; - } else { - $iCols .= ",$k"; - $iVals .= ",$v"; - } - } - $insert = "INSERT INTO $table ($iCols) VALUES ($iVals)"; - $rs = $zthis->Execute($insert); - return ($rs) ? 2 : 0; + $insert = "INSERT INTO $table ($iCols) VALUES ($iVals)"; + $rs = $zthis->Execute($insert); + return ($rs) ? 2 : 0; } -// Requires $ADODB_FETCH_MODE = ADODB_FETCH_NUM function _adodb_getmenu(&$zthis, $name,$defstr='',$blank1stItem=true,$multiple=false, $size=0, $selectAttr='',$compareFields0=true) { - $hasvalue = false; - - if ($multiple or is_array($defstr)) { - if ($size==0) $size=5; - $attr = ' multiple size="'.$size.'"'; - if (!strpos($name,'[]')) $name .= '[]'; - } else if ($size) $attr = ' size="'.$size.'"'; - else $attr =''; + global $ADODB_FETCH_MODE; - $s = '\n"; } -// Requires $ADODB_FETCH_MODE = ADODB_FETCH_NUM function _adodb_getmenu_gp(&$zthis, $name,$defstr='',$blank1stItem=true,$multiple=false, $size=0, $selectAttr='',$compareFields0=true) { - $hasvalue = false; - - if ($multiple or is_array($defstr)) { - if ($size==0) $size=5; - $attr = ' multiple size="'.$size.'"'; - if (!strpos($name,'[]')) $name .= '[]'; - } else if ($size) $attr = ' size="'.$size.'"'; - else $attr =''; + global $ADODB_FETCH_MODE; - $s = '\n"; } +/** + * Generate the opening SELECT tag for getmenu functions. + * + * ADOdb internal function, used by _adodb_getmenu() and _adodb_getmenu_gp(). + * + * @param string $name + * @param string $defstr + * @param bool $blank1stItem + * @param bool $multiple + * @param int $size + * @param string $selectAttr + * + * @return string HTML + */ +function _adodb_getmenu_select($name, $defstr = '', $blank1stItem = true, + $multiple = false, $size = 0, $selectAttr = '') +{ + if ($multiple || is_array($defstr)) { + if ($size == 0 ) { + $size = 5; + } + $attr = ' multiple size="' . $size . '"'; + if (!strpos($name,'[]')) { + $name .= '[]'; + } + } elseif ($size) { + $attr = ' size="' . $size . '"'; + } else { + $attr = ''; + } + + $html = '> Access
-> Interbase
-> MSSQL
-> MySQL
-> MySQL ODBC
-> MySQLi -
-> SQLite
-> MySQL Proxy
-> Oracle (oci8)
-> PostgreSQL
-> PostgreSQL 9
-> PostgreSQL ODBC
- -> PgSQL PDO
-> MySQL PDO
-> SQLite PDO
-> Access PDO
-> MSSQL PDO
- -> OCI PDO
- -> DB2
-> VFP+ODBTP
-> ADO (for mssql and access)
-> $ADODB_COUNTRECS=false
-> No SQL Logging
-> ADOdb time test - - - - -FETCH MODE IS NOT ADODB_FETCH_DEFAULT"; - -if (isset($nocountrecs)) $ADODB_COUNTRECS = false; - -// cannot test databases below, but we include them anyway to check -// if they parse ok... - -if (sizeof($_GET) || !isset($_SERVER['HTTP_HOST'])) { - echo "
"; - ADOLoadCode2("sybase"); - ADOLoadCode2("postgres"); - ADOLoadCode2("postgres7"); - ADOLoadCode2("firebird"); - ADOLoadCode2("borland_ibase"); - ADOLoadCode2("informix"); - ADOLoadCode2('mysqli'); - if (defined('ODBC_BINMODE_RETURN')) { - ADOLoadCode2("sqlanywhere"); - ADOLoadCode2("access"); - } - ADOLoadCode2("mysql"); - ADOLoadCode2("oci8"); -} - -function ADOLoadCode2($d) -{ - ADOLoadCode($d); - $c = ADONewConnection($d); - echo "Loaded $d ",($c ? 'ok' : 'extension not installed'),"
"; -} - -flush(); - -// dregad 2014-04-15 added serial field to avoid error with lastval() -$pg_test_table = "create table ADOXYZ (id integer, firstname char(24), lastname varchar,created date, ser serial)"; -$pg_hostname = 'localhost'; -$pg_user = 'tester'; -$pg_password = 'test'; -$pg_database = 'northwind'; -$pg_errmsg = "ERROR: PostgreSQL requires a database called '$pg_database' " - . "on server '$pg_hostname', user '$pg_user', password '$pg_password'.
"; - -if (!empty($testpostgres)) { - //ADOLoadCode("postgres"); - - $db = ADONewConnection('postgres'); - print "

Connecting $db->databaseType...

"; - if ($db->Connect($pg_hostname, $pg_user, $pg_password, $pg_database)) { - testdb($db, $pg_test_table); - } else { - print $pg_errmsg . $db->ErrorMsg(); - } -} - -if (!empty($testpostgres9)) { - //ADOLoadCode("postgres"); - - $db = ADONewConnection('postgres9'); - print "

Connecting $db->databaseType...

"; - if ($db->Connect($pg_hostname, $pg_user, $pg_password, $pg_database)) { - testdb($db, $pg_test_table); - } else { - print $pg_errmsg . $db->ErrorMsg(); - } -} - -if (!empty($testpgodbc)) { - - $db = ADONewConnection('odbc'); - $db->hasTransactions = false; - print "

Connecting $db->databaseType...

"; - - if ($db->PConnect('Postgresql')) { - $db->hasTransactions = true; - testdb($db, - "create table ADOXYZ (id int, firstname char(24), lastname char(24), created date) type=innodb"); - } else print "ERROR: PostgreSQL requires a database called test on server, user tester, password test.
".$db->ErrorMsg(); -} - -if (!empty($testibase)) { - //$_GET['nolog'] = true; - $db = ADONewConnection('firebird'); - print "

Connecting $db->databaseType...

"; - if ($db->PConnect("localhost:d:\\firebird\\151\\examples\\EMPLOYEE.fdb", "sysdba", "masterkey", "")) - testdb($db,"create table ADOXYZ (id integer, firstname char(24), lastname char(24),price numeric(12,2),created date)"); - else print "ERROR: Interbase test requires a database called employee.gdb".'
'.$db->ErrorMsg(); - -} - - -if (!empty($testsqlite)) { - $path =urlencode('d:\inetpub\adodb\sqlite.db'); - $dsn = "sqlite://$path/"; - $db = ADONewConnection($dsn); - //echo $dsn; - - //$db = ADONewConnection('sqlite'); - - - if ($db && $db->PConnect("d:\\inetpub\\adodb\\sqlite.db", "", "", "")) { - print "

Connecting $db->databaseType...

"; - testdb($db,"create table ADOXYZ (id int, firstname char(24), lastname char(24),created datetime)"); - } else - print "ERROR: SQLite"; - -} - -if (!empty($testpdopgsql)) { - $connstr = "pgsql:dbname=test"; - $u = 'tester';$p='test'; - $db = ADONewConnection('pdo'); - print "

Connecting $db->databaseType...

"; - $db->Connect($connstr,$u,$p) || die("CONNECT FAILED"); - testdb($db, - "create table ADOXYZ (id int, firstname char(24), lastname char(24), created date)"); -} - -if (!empty($testpdomysql)) { - $connstr = "mysql:dbname=northwind"; - $u = 'root';$p=''; - $db = ADONewConnection('pdo'); - print "

Connecting $db->databaseType...

"; - $db->Connect($connstr,$u,$p) || die("CONNECT FAILED"); - - testdb($db, - "create table ADOXYZ (id int, firstname char(24), lastname char(24), created date)"); -} - -if (!empty($testpdomssql)) { - $connstr = "mssql:dbname=northwind"; - $u = 'sa';$p='natsoft'; - $db = ADONewConnection('pdo'); - print "

Connecting $db->databaseType...

"; - $db->Connect($connstr,$u,$p) || die("CONNECT FAILED"); - - testdb($db, - "create table ADOXYZ (id int, firstname char(24), lastname char(24), created date)"); -} - -if (!empty($testpdosqlite)) { - $connstr = "sqlite:d:/inetpub/adodb/sqlite-pdo.db3"; - $u = '';$p=''; - $db = ADONewConnection('pdo'); - $db->hasTransactions = false; - print "

Connecting $db->databaseType...

"; - $db->Connect($connstr,$u,$p) || die("CONNECT FAILED"); - testdb($db, - "create table ADOXYZ (id int, firstname char(24), lastname char(24), created date)"); -} - -if (!empty($testpdoaccess)) { - $connstr = 'odbc:nwind'; - $u = '';$p=''; - $db = ADONewConnection('pdo'); - $db->hasTransactions = false; - print "

Connecting $db->databaseType...

"; - $db->Connect($connstr,$u,$p) || die("CONNECT FAILED"); - testdb($db, - "create table ADOXYZ (id int, firstname char(24), lastname char(24), created date)"); -} - -if (!empty($testpdoora)) { - $connstr = 'oci:'; - $u = 'scott';$p='natsoft'; - $db = ADONewConnection('pdo'); - #$db->hasTransactions = false; - print "

Connecting $db->databaseType...

"; - $db->Connect($connstr,$u,$p) || die("CONNECT FAILED"); - testdb($db, - "create table ADOXYZ (id int, firstname char(24), lastname char(24), created date)"); -} - -// REQUIRES ODBC DSN CALLED nwind -if (!empty($testaccess)) { - $db = ADONewConnection('access'); - print "

Connecting $db->databaseType...

"; - $access = 'd:\inetpub\wwwroot\php\NWIND.MDB'; - $dsn = "nwind"; - $dsn = "Driver={Microsoft Access Driver (*.mdb)};Dbq=$access;Uid=Admin;Pwd=;"; - - //$dsn = 'Provider=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=' . $access . ';'; - if ($db->PConnect($dsn, "", "", "")) - testdb($db,"create table ADOXYZ (id int, firstname char(24), lastname char(24),created datetime)"); - else print "ERROR: Access test requires a Windows ODBC DSN=nwind, Access driver"; - -} - -if (!empty($testaccess) && !empty($testado)) { // ADO ACCESS - - $db = ADONewConnection("ado_access"); - print "

Connecting $db->databaseType...

"; - - $access = 'd:\inetpub\wwwroot\php\NWIND.MDB'; - $myDSN = 'PROVIDER=Microsoft.Jet.OLEDB.4.0;' - . 'DATA SOURCE=' . $access . ';'; - //. 'USER ID=;PASSWORD=;'; - $_GET['nolog'] = 1; - if ($db->PConnect($myDSN, "", "", "")) { - print "ADO version=".$db->_connectionID->version."
"; - testdb($db,"create table ADOXYZ (id int, firstname char(24), lastname char(24),created datetime)"); - } else print "ERROR: Access test requires a Access database $access".'
'.$db->ErrorMsg(); - -} - -if (!empty($testvfp)) { // ODBC - $db = ADONewConnection('vfp'); - print "

Connecting $db->databaseType...

";flush(); - - if ( $db->PConnect("vfp-adoxyz")) { - testdb($db,"create table d:\\inetpub\\adodb\\ADOXYZ (id int, firstname char(24), lastname char(24),created date)"); - } else print "ERROR: Visual FoxPro test requires a Windows ODBC DSN=vfp-adoxyz, VFP driver"; - - echo "
"; - $db = ADONewConnection('odbtp'); - - if ( $db->PConnect('localhost','DRIVER={Microsoft Visual FoxPro Driver};SOURCETYPE=DBF;SOURCEDB=d:\inetpub\adodb;EXCLUSIVE=NO;')) { - print "

Connecting $db->databaseType...

";flush(); - testdb($db,"create table d:\\inetpub\\adodb\\ADOXYZ (id int, firstname char(24), lastname char(24),created date)"); - } else print "ERROR: Visual FoxPro odbtp requires a Windows ODBC DSN=vfp-adoxyz, VFP driver"; - -} - - -// REQUIRES MySQL server at localhost with database 'test' -if (!empty($testmysql)) { // MYSQL - - - if (PHP_VERSION >= 5 || $_SERVER['HTTP_HOST'] == 'localhost') $server = 'localhost'; - else $server = "mangrove"; - $user = 'root'; $password = ''; $database = 'northwind'; - $db = ADONewConnection("mysqlt://$user:$password@$server/$database?persist"); - print "

Connecting $db->databaseType...

"; - - if (true || $db->PConnect($server, "root", "", "northwind")) { - //$db->Execute("DROP TABLE ADOXYZ") || die('fail drop'); - //$db->debug=1;$db->Execute('drop table ADOXYZ'); - testdb($db, - "create table ADOXYZ (id int, firstname char(24), lastname char(24), created date) Type=InnoDB"); - } else print "ERROR: MySQL test requires a MySQL server on localhost, userid='admin', password='', database='test'".'
'.$db->ErrorMsg(); -} - -// REQUIRES MySQL server at localhost with database 'test' -if (!empty($testmysqli)) { // MYSQL - - $db = ADONewConnection('mysqli'); - print "

Connecting $db->databaseType...

"; - if (PHP_VERSION >= 5 || $_SERVER['HTTP_HOST'] == 'localhost') $server = 'localhost'; - else $server = "mangrove"; - if ($db->PConnect($server, "root", "", "northwind")) { - //$db->debug=1;$db->Execute('drop table ADOXYZ'); - testdb($db, - "create table ADOXYZ (id int, firstname char(24), lastname char(24), created date)"); - } else print "ERROR: MySQL test requires a MySQL server on localhost, userid='admin', password='', database='test'".'
'.$db->ErrorMsg(); -} - - -// REQUIRES MySQL server at localhost with database 'test' -if (!empty($testmysqlodbc)) { // MYSQL - - $db = ADONewConnection('odbc'); - $db->hasTransactions = false; - print "

Connecting $db->databaseType...

"; - if ($_SERVER['HTTP_HOST'] == 'localhost') $server = 'localhost'; - else $server = "mangrove"; - if ($db->PConnect('mysql', "root", "")) - testdb($db, - "create table ADOXYZ (id int, firstname char(24), lastname char(24), created date) type=innodb"); - else print "ERROR: MySQL test requires a MySQL server on localhost, userid='admin', password='', database='test'".'
'.$db->ErrorMsg(); -} - -if (!empty($testproxy)){ - $db = ADONewConnection('proxy'); - print "

Connecting $db->databaseType...

"; - if ($_SERVER['HTTP_HOST'] == 'localhost') $server = 'localhost'; - - if ($db->PConnect('http://localhost/php/phplens/adodb/server.php')) - testdb($db, - "create table ADOXYZ (id int, firstname char(24), lastname char(24), created date) type=innodb"); - else print "ERROR: MySQL test requires a MySQL server on localhost, userid='admin', password='', database='test'".'
'.$db->ErrorMsg(); - -} - -ADOLoadCode('oci805'); -ADOLoadCode("oci8po"); - -if (!empty($testoracle)) { - $dsn = "oci8";//://scott:natsoft@kk2?persist"; - $db = ADONewConnection($dsn );//'oci8'); - - //$db->debug=1; - print "

Connecting $db->databaseType...

"; - if ($db->Connect('mobydick', "scott", "natsoft",'SID=mobydick')) - testdb($db,"create table ADOXYZ (id int, firstname varchar(24), lastname varchar(24),created date)"); - else - print "ERROR: Oracle test requires an Oracle server setup with scott/natsoft".'
'.$db->ErrorMsg(); - -} -ADOLoadCode("oracle"); // no longer supported -if (false && !empty($testoracle)) { - - $db = ADONewConnection(); - print "

Connecting $db->databaseType...

"; - if ($db->PConnect("", "scott", "tiger", "natsoft.domain")) - testdb($db,"create table ADOXYZ (id int, firstname varchar(24), lastname varchar(24),created date)"); - else print "ERROR: Oracle test requires an Oracle server setup with scott/tiger".'
'.$db->ErrorMsg(); - -} - -ADOLoadCode("odbc_db2"); // no longer supported -if (!empty($testdb2)) { - if (PHP_VERSION>=5.1) { - $db = ADONewConnection("db2"); - print "

Connecting $db->databaseType...

"; - - #$db->curMode = SQL_CUR_USE_ODBC; - #$dsn = "driver={IBM db2 odbc DRIVER};Database=test;hostname=localhost;port=50000;protocol=TCPIP; uid=natsoft; pwd=guest"; - if ($db->Connect('localhost','natsoft','guest','test')) { - testdb($db,"create table ADOXYZ (id int, firstname varchar(24), lastname varchar(24),created date)"); - } else print "ERROR: DB2 test requires an server setup with odbc data source db2_sample".'
'.$db->ErrorMsg(); - } else { - $db = ADONewConnection("odbc_db2"); - print "

Connecting $db->databaseType...

"; - - $dsn = "db2test"; - #$db->curMode = SQL_CUR_USE_ODBC; - #$dsn = "driver={IBM db2 odbc DRIVER};Database=test;hostname=localhost;port=50000;protocol=TCPIP; uid=natsoft; pwd=guest"; - if ($db->Connect($dsn)) { - testdb($db,"create table ADOXYZ (id int, firstname varchar(24), lastname varchar(24),created date)"); - } else print "ERROR: DB2 test requires an server setup with odbc data source db2_sample".'
'.$db->ErrorMsg(); - } -echo "
"; -flush(); - $dsn = "driver={IBM db2 odbc DRIVER};Database=sample;hostname=localhost;port=50000;protocol=TCPIP; uid=root; pwd=natsoft"; - - $db = ADONewConnection('odbtp'); - if ($db->Connect('127.0.0.1',$dsn)) { - - $db->debug=1; - $arr = $db->GetArray( "||SQLProcedures" ); adodb_pr($arr); - $arr = $db->GetArray( "||SQLProcedureColumns|||GET_ROUTINE_SAR" );adodb_pr($arr); - - testdb($db,"create table ADOXYZ (id int, firstname varchar(24), lastname varchar(24),created date)"); - } else echo ("ERROR Connection"); - echo $db->ErrorMsg(); -} - - -$server = 'localhost'; - - - -ADOLoadCode("mssqlpo"); -if (false && !empty($testmssql)) { // MS SQL Server -- the extension is buggy -- probably better to use ODBC - $db = ADONewConnection("mssqlpo"); - //$db->debug=1; - print "

Connecting $db->databaseType...

"; - - $ok = $db->Connect('','sa','natsoft','northwind'); - echo $db->ErrorMsg(); - if ($ok /*or $db->PConnect("mangrove", "sa", "natsoft", "ai")*/) { - AutoDetect_MSSQL_Date_Order($db); - // $db->Execute('drop table adoxyz'); - testdb($db,"create table ADOXYZ (id int, firstname char(24) null, lastname char(24) null,created datetime null)"); - } else print "ERROR: MSSQL test 2 requires a MS SQL 7 on a server='$server', userid='adodb', password='natsoft', database='ai'".'
'.$db->ErrorMsg(); - -} - - -ADOLoadCode('odbc_mssql'); -if (!empty($testmssql)) { // MS SQL Server via ODBC - $db = ADONewConnection(); - - print "

Connecting $db->databaseType...

"; - - $dsn = "PROVIDER=MSDASQL;Driver={SQL Server};Server=$server;Database=northwind;"; - $dsn = 'condor'; - if ($db->PConnect($dsn, "sa", "natsoft", "")) { - testdb($db,"create table ADOXYZ (id int, firstname char(24) null, lastname char(24) null,created datetime null)"); - } - else print "ERROR: MSSQL test 1 requires a MS SQL 7 server setup with DSN setup"; - -} - -ADOLoadCode("ado_mssql"); -if (!empty($testmssql) && !empty($testado) ) { // ADO ACCESS MSSQL -- thru ODBC -- DSN-less - - $db = ADONewConnection("ado_mssql"); - //$db->debug=1; - print "

Connecting DSN-less $db->databaseType...

"; - - $myDSN="PROVIDER=MSDASQL;DRIVER={SQL Server};" - . "SERVER=$server;DATABASE=NorthWind;UID=adodb;PWD=natsoft;Trusted_Connection=No"; - - - if ($db->PConnect($myDSN, "", "", "")) - testdb($db,"create table ADOXYZ (id int, firstname char(24) null, lastname char(24) null,created datetime null)"); - else print "ERROR: MSSQL test 2 requires MS SQL 7"; - -} - -if (!empty($testmssql) && !empty($testado)) { // ADO ACCESS MSSQL with OLEDB provider - - $db = ADONewConnection("ado_mssql"); - print "

Connecting DSN-less OLEDB Provider $db->databaseType...

"; - //$db->debug=1; - $myDSN="SERVER=localhost;DATABASE=northwind;Trusted_Connection=yes"; - if ($db->PConnect($myDSN, "adodb", "natsoft", 'SQLOLEDB')) { - testdb($db,"create table ADOXYZ (id int, firstname char(24), lastname char(24),created datetime)"); - } else print "ERROR: MSSQL test 2 requires a MS SQL 7 on a server='mangrove', userid='sa', password='', database='ai'"; - -} - - -if (extension_loaded('odbtp') && !empty($testmssql)) { // MS SQL Server via ODBC - $db = ADONewConnection('odbtp'); - - $dsn = "PROVIDER=MSDASQL;Driver={SQL Server};Server=$server;Database=northwind;uid=adodb;pwd=natsoft"; - - if ($db->PConnect('localhost',$dsn, "", "")) { - print "

Connecting $db->databaseType...

"; - testdb($db,"create table ADOXYZ (id int, firstname char(24) null, lastname char(24) null,created datetime null)"); - } - else print "ERROR: MSSQL test 1 requires a MS SQL 7 server setup with DSN setup"; - -} - - -print "

Tests Completed

"; diff --git a/app/vendor/adodb/adodb-php/tests/testgenid.php b/app/vendor/adodb/adodb-php/tests/testgenid.php deleted file mode 100644 index 3310734a5..000000000 --- a/app/vendor/adodb/adodb-php/tests/testgenid.php +++ /dev/null @@ -1,35 +0,0 @@ -Execute("drop table $table"); - //$db->debug=true; - - $ctr = 5000; - $lastnum = 0; - - while (--$ctr >= 0) { - $num = $db->GenID($table); - if ($num === false) { - print "GenID returned false"; - break; - } - if ($lastnum + 1 == $num) print " $num "; - else { - print " $num "; - flush(); - } - $lastnum = $num; - } -} diff --git a/app/vendor/adodb/adodb-php/tests/testmssql.php b/app/vendor/adodb/adodb-php/tests/testmssql.php deleted file mode 100644 index 733f0d455..000000000 --- a/app/vendor/adodb/adodb-php/tests/testmssql.php +++ /dev/null @@ -1,77 +0,0 @@ -Connect('127.0.0.1','adodb','natsoft','northwind') or die('Fail'); - -$conn->debug =1; -$query = 'select * from products'; -$conn->SetFetchMode(ADODB_FETCH_ASSOC); -$rs = $conn->Execute($query); -echo "
";
-while( !$rs->EOF ) {
-	$output[] = $rs->fields;
-	var_dump($rs->fields);
-	$rs->MoveNext();
-	print "

"; -} -die(); - - -$p = $conn->Prepare('insert into products (productname,unitprice,dcreated) values (?,?,?)'); -echo "

";
-print_r($p);
-
-$conn->debug=1;
-$conn->Execute($p,array('John'.rand(),33.3,$conn->DBDate(time())));
-
-$p = $conn->Prepare('select * from products where productname like ?');
-$arr = $conn->getarray($p,array('V%'));
-print_r($arr);
-die();
-
-//$conn = ADONewConnection("mssql");
-//$conn->Connect('mangrove','sa','natsoft','ai');
-
-//$conn->Connect('mangrove','sa','natsoft','ai');
-$conn->debug=1;
-$conn->Execute('delete from blobtest');
-
-$conn->Execute('insert into blobtest (id) values(1)');
-$conn->UpdateBlobFile('blobtest','b1','../cute_icons_for_site/adodb.gif','id=1');
-$rs = $conn->Execute('select b1 from blobtest where id=1');
-
-$output = "c:\\temp\\test_out-".date('H-i-s').".gif";
-print "Saving file $output, size=".strlen($rs->fields[0])."

"; -$fd = fopen($output, "wb"); -fwrite($fd, $rs->fields[0]); -fclose($fd); - -print " View Image"; -//$rs = $conn->Execute('SELECT id,SUBSTRING(b1, 1, 10) FROM blobtest'); -//rs2html($rs); diff --git a/app/vendor/adodb/adodb-php/tests/testoci8.php b/app/vendor/adodb/adodb-php/tests/testoci8.php deleted file mode 100644 index 5eadc22ed..000000000 --- a/app/vendor/adodb/adodb-php/tests/testoci8.php +++ /dev/null @@ -1,84 +0,0 @@ - - -PConnect('','scott','natsoft'); - if (!empty($testblob)) { - $varHoldingBlob = 'ABC DEF GEF John TEST'; - $num = time()%10240; - // create table atable (id integer, ablob blob); - $db->Execute('insert into ATABLE (id,ablob) values('.$num.',empty_blob())'); - $db->UpdateBlob('ATABLE', 'ablob', $varHoldingBlob, 'id='.$num, 'BLOB'); - - $rs = $db->Execute('select * from atable'); - - if (!$rs) die("Empty RS"); - if ($rs->EOF) die("EOF RS"); - rs2html($rs); - } - $stmt = $db->Prepare('select * from adoxyz where id=?'); - for ($i = 1; $i <= 10; $i++) { - $rs = $db->Execute( - $stmt, - array($i)); - - if (!$rs) die("Empty RS"); - if ($rs->EOF) die("EOF RS"); - rs2html($rs); - } -} -if (1) { - $db = ADONewConnection('oci8'); - $db->PConnect('','scott','natsoft'); - $db->debug = true; - $db->Execute("delete from emp where ename='John'"); - print $db->Affected_Rows().'
'; - $stmt = $db->Prepare('insert into emp (empno, ename) values (:empno, :ename)'); - $rs = $db->Execute($stmt,array('empno'=>4321,'ename'=>'John')); - // prepare not quite ready for prime time - //$rs = $db->Execute($stmt,array('empno'=>3775,'ename'=>'John')); - if (!$rs) die("Empty RS"); - - $db->setfetchmode(ADODB_FETCH_NUM); - - $vv = 'A%'; - $stmt = $db->PrepareSP("BEGIN adodb.open_tab2(:rs,:tt); END;",true); - $db->OutParameter($stmt, $cur, 'rs', -1, OCI_B_CURSOR); - $db->OutParameter($stmt, $vv, 'tt'); - $rs = $db->Execute($stmt); - while (!$rs->EOF) { - adodb_pr($rs->fields); - $rs->MoveNext(); - } - echo " val = $vv"; - -} - -if (0) { - $db = ADONewConnection('odbc_oracle'); - if (!$db->PConnect('local_oracle','scott','tiger')) die('fail connect'); - $db->debug = true; - $rs = $db->Execute( - 'select * from adoxyz where firstname=? and trim(lastname)=?', - array('first'=>'Caroline','last'=>'Miranda')); - if (!$rs) die("Empty RS"); - if ($rs->EOF) die("EOF RS"); - rs2html($rs); -} diff --git a/app/vendor/adodb/adodb-php/tests/testoci8cursor.php b/app/vendor/adodb/adodb-php/tests/testoci8cursor.php deleted file mode 100644 index 1f7b381e5..000000000 --- a/app/vendor/adodb/adodb-php/tests/testoci8cursor.php +++ /dev/null @@ -1,110 +0,0 @@ -PConnect('','scott','natsoft'); - $db->debug = 99; - - -/* -*/ - - define('MYNUM',5); - - - $rs = $db->ExecuteCursor("BEGIN adodb.open_tab(:RS,'A%'); END;"); - - if ($rs && !$rs->EOF) { - print "Test 1 RowCount: ".$rs->RecordCount()."

"; - } else { - print "Error in using Cursor Variables 1

"; - } - - print "

Testing Stored Procedures for oci8

"; - - $stid = $db->PrepareSP('BEGIN adodb.myproc('.MYNUM.', :myov); END;'); - $db->OutParameter($stid, $myov, 'myov'); - $db->Execute($stid); - if ($myov != MYNUM) print "

Error with myproc

"; - - - $stmt = $db->PrepareSP("BEGIN adodb.data_out(:a1, :a2); END;",true); - $a1 = 'Malaysia'; - //$a2 = ''; # a2 doesn't even need to be defined! - $db->InParameter($stmt,$a1,'a1'); - $db->OutParameter($stmt,$a2,'a2'); - $rs = $db->Execute($stmt); - if ($rs) { - if ($a2 !== 'Cinta Hati Malaysia') print "Stored Procedure Error: a2 = $a2

"; - else echo "OK: a2=$a2

"; - } else { - print "Error in using Stored Procedure IN/Out Variables

"; - } - - - $tname = 'A%'; - - $stmt = $db->PrepareSP('select * from tab where tname like :tablename'); - $db->Parameter($stmt,$tname,'tablename'); - $rs = $db->Execute($stmt); - rs2html($rs); diff --git a/app/vendor/adodb/adodb-php/tests/testpaging.php b/app/vendor/adodb/adodb-php/tests/testpaging.php deleted file mode 100644 index 947641bed..000000000 --- a/app/vendor/adodb/adodb-php/tests/testpaging.php +++ /dev/null @@ -1,87 +0,0 @@ -PConnect('localhost','tester','test','test'); -} - -if ($driver == 'access') { - $db = NewADOConnection('access'); - $db->PConnect("nwind", "", "", ""); -} - -if ($driver == 'ibase') { - $db = NewADOConnection('ibase'); - $db->PConnect("localhost:e:\\firebird\\examples\\employee.gdb", "sysdba", "masterkey", ""); - $sql = 'select distinct firstname, lastname from adoxyz order by firstname'; - -} -if ($driver == 'mssql') { - $db = NewADOConnection('mssql'); - $db->Connect('JAGUAR\vsdotnet','adodb','natsoft','northwind'); -} -if ($driver == 'oci8') { - $db = NewADOConnection('oci8'); - $db->Connect('','scott','natsoft'); - -$sql = "select * from (select ID, firstname as \"First Name\", lastname as \"Last Name\" from adoxyz - order by 1)"; -} - -if ($driver == 'access') { - $db = NewADOConnection('access'); - $db->Connect('nwind'); -} - -if (empty($driver) or $driver == 'mysql') { - $db = NewADOConnection('mysql'); - $db->Connect('localhost','root','','test'); -} - -//$db->pageExecuteCountRows = false; - -$db->debug = true; - -if (0) { -$rs = $db->Execute($sql); -include_once('../toexport.inc.php'); -print "

";
-print rs2csv($rs); # return a string
-
-print '
'; -$rs->MoveFirst(); # note, some databases do not support MoveFirst -print rs2tab($rs); # return a string - -print '
'; -$rs->MoveFirst(); -rs2tabout($rs); # send to stdout directly -print "
"; -} - -$pager = new ADODB_Pager($db,$sql); -$pager->showPageLinks = true; -$pager->linksPerPage = 10; -$pager->cache = 60; -$pager->Render($rows=7); diff --git a/app/vendor/adodb/adodb-php/tests/testpear.php b/app/vendor/adodb/adodb-php/tests/testpear.php deleted file mode 100644 index a59f5f2c6..000000000 --- a/app/vendor/adodb/adodb-php/tests/testpear.php +++ /dev/null @@ -1,35 +0,0 @@ -setFetchMode(ADODB_FETCH_ASSOC); -$rs = $db->Query('select firstname,lastname from adoxyz'); -$cnt = 0; -while ($arr = $rs->FetchRow()) { - print_r($arr); - print "
"; - $cnt += 1; -} - -if ($cnt != 50) print "Error in \$cnt = $cnt"; diff --git a/app/vendor/adodb/adodb-php/tests/testsessions.php b/app/vendor/adodb/adodb-php/tests/testsessions.php deleted file mode 100644 index 79a66191c..000000000 --- a/app/vendor/adodb/adodb-php/tests/testsessions.php +++ /dev/null @@ -1,100 +0,0 @@ -Notify Expiring=$ref, sessionkey=$key

"; -} - -//------------------------------------------------------------------- - -error_reporting(E_ALL); - - -ob_start(); -include('../session/adodb-cryptsession2.php'); - - -$options['debug'] = 1; -$db = 'postgres'; - -#### CONNECTION -switch($db) { -case 'oci8': - $options['table'] = 'adodb_sessions2'; - ADOdb_Session::config('oci8', 'mobydick', 'jdev', 'natsoft', 'mobydick',$options); - break; - -case 'postgres': - $options['table'] = 'sessions2'; - ADOdb_Session::config('postgres', 'localhost', 'postgres', 'natsoft', 'northwind',$options); - break; - -case 'mysql': -default: - $options['table'] = 'sessions2'; - ADOdb_Session::config('mysql', 'localhost', 'root', '', 'xphplens_2',$options); - break; - - -} - - - -#### SETUP NOTIFICATION - $USER = 'JLIM'.rand(); - $ADODB_SESSION_EXPIRE_NOTIFY = array('USER','NotifyExpire'); - - adodb_session_create_table(); - session_start(); - - adodb_session_regenerate_id(); - -### SETUP SESSION VARIABLES - if (empty($_SESSION['MONKEY'])) $_SESSION['MONKEY'] = array(1,'abc',44.41); - else $_SESSION['MONKEY'][0] += 1; - if (!isset($_GET['nochange'])) @$_SESSION['AVAR'] += 1; - - -### START DISPLAY - print "

PHP ".PHP_VERSION."

"; - print "

\$_SESSION['AVAR']={$_SESSION['AVAR']}

"; - - print "
Cookies: "; - print_r($_COOKIE); - - var_dump($_SESSION['MONKEY']); - -### RANDOMLY PERFORM Garbage Collection -### In real-production environment, this is done for you -### by php's session extension, which calls adodb_sess_gc() -### automatically for you. See php.ini's -### session.cookie_lifetime and session.gc_probability - - if (rand() % 5 == 0) { - - print "

Garbage Collection

"; - adodb_sess_gc(10); - - if (rand() % 2 == 0) { - print "

Random own session destroy

"; - session_destroy(); - } - } else { - $DB = ADODB_Session::_conn(); - $sessk = $DB->qstr('%AZ'.rand().time()); - $olddate = $DB->DBTimeStamp(time()-30*24*3600); - $rr = $DB->qstr(rand()); - $DB->Execute("insert into {$options['table']} (sesskey,expiry,expireref,sessdata,created,modified) values ($sessk,$olddate, $rr,'',$olddate,$olddate)"); - } diff --git a/app/vendor/adodb/adodb-php/tests/time.php b/app/vendor/adodb/adodb-php/tests/time.php deleted file mode 100644 index 8261e1e92..000000000 --- a/app/vendor/adodb/adodb-php/tests/time.php +++ /dev/null @@ -1,16 +0,0 @@ - -" ); -echo( "Converted: $convertedDate" ); //why is string returned as one day (3 not 4) less for this example?? diff --git a/app/vendor/adodb/adodb-php/tests/tmssql.php b/app/vendor/adodb/adodb-php/tests/tmssql.php deleted file mode 100644 index 0f81311aa..000000000 --- a/app/vendor/adodb/adodb-php/tests/tmssql.php +++ /dev/null @@ -1,79 +0,0 @@ -mssql"; - $db = mssql_connect('JAGUAR\vsdotnet','adodb','natsoft') or die('No Connection'); - mssql_select_db('northwind',$db); - - $rs = mssql_query('select getdate() as date',$db); - $o = mssql_fetch_row($rs); - print_r($o); - mssql_free_result($rs); - - print "

Delete

"; flush(); - $rs2 = mssql_query('delete from adoxyz',$db); - $p = mssql_num_rows($rs2); - mssql_free_result($rs2); - -} - -function tpear() -{ -include_once('DB.php'); - - print "

PEAR

"; - $username = 'adodb'; - $password = 'natsoft'; - $hostname = 'JAGUAR\vsdotnet'; - $databasename = 'northwind'; - - $dsn = "mssql://$username:$password@$hostname/$databasename"; - $conn = DB::connect($dsn); - print "date=".$conn->GetOne('select getdate()')."
"; - @$conn->query('create table tester (id integer)'); - print "

Delete

"; flush(); - $rs = $conn->query('delete from tester'); - print "date=".$conn->GetOne('select getdate()')."
"; -} - -function tadodb() -{ -include_once('../adodb.inc.php'); - - print "

ADOdb

"; - $conn = NewADOConnection('mssql'); - $conn->Connect('JAGUAR\vsdotnet','adodb','natsoft','northwind'); -// $conn->debug=1; - print "date=".$conn->GetOne('select getdate()')."
"; - $conn->Execute('create table tester (id integer)'); - print "

Delete

"; flush(); - $rs = $conn->Execute('delete from tester'); - print "date=".$conn->GetOne('select getdate()')."
"; -} - - -$ACCEPTIP = '127.0.0.1'; - -$remote = $_SERVER["REMOTE_ADDR"]; - -if (!empty($ACCEPTIP)) - if ($remote != '127.0.0.1' && $remote != $ACCEPTIP) - die("Unauthorised client: '$remote'"); - -?> -mssql -pear -adodb - - - - - - - - - - - - - -id - - -id - - - -
- - SQL to be executed only on specific platforms - - insert into mytable ( row1, row2 ) values ( 12, 'postgres stuff' ) - - - insert into mytable ( row1, row2 ) values ( 12, 'mysql stuff' ) - - - INSERT into simple_table ( name, description ) values ( '12', 'Microsoft stuff' ) - - -
\ No newline at end of file diff --git a/app/vendor/adodb/adodb-php/tests/xmlschema.xml b/app/vendor/adodb/adodb-php/tests/xmlschema.xml deleted file mode 100644 index ea48ae2bb..000000000 --- a/app/vendor/adodb/adodb-php/tests/xmlschema.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - An integer row that's a primary key and autoincrements - - - - - A 16 character varchar row that can't be null - - - - row1 - row2 - -
- - SQL to be executed only on specific platforms - - insert into mytable ( row1, row2 ) values ( 12, 'postgres stuff' ) - - - insert into mytable ( row1, row2 ) values ( 12, 'mysql stuff' ) - - - insert into mytable ( row1, row2 ) values ( 12, 'Microsoft stuff' ) - - - - -
-
\ No newline at end of file diff --git a/app/vendor/adodb/adodb-php/toexport.inc.php b/app/vendor/adodb/adodb-php/toexport.inc.php index 94c394b8e..66bbf5424 100644 --- a/app/vendor/adodb/adodb-php/toexport.inc.php +++ b/app/vendor/adodb/adodb-php/toexport.inc.php @@ -1,14 +1,6 @@ name : 'Field'.($i++); if ($escquote) $v = str_replace($quote,$escquotequote,$v); diff --git a/app/vendor/adodb/adodb-php/tohtml.inc.php b/app/vendor/adodb/adodb-php/tohtml.inc.php index d39ed2919..e92c8b44a 100644 --- a/app/vendor/adodb/adodb-php/tohtml.inc.php +++ b/app/vendor/adodb/adodb-php/tohtml.inc.php @@ -1,14 +1,29 @@ -*/ +/** + * RecordSet to HTML Table + * + * Convert a recordset to a html table. Multiple tables are generated + * if the number of rows is > $gSQLBlockRows. This is because + * web browsers normally require the whole table to be downloaded + * before it can be rendered, so we break the output into several + * smaller, faster rendering tables. + * + * This file is part of ADOdb, a Database Abstraction Layer library for PHP. + * + * @package ADOdb + * @link https://adodb.org Project's web site and documentation + * @link https://github.com/ADOdb/ADOdb Source code and issue tracker + * + * The ADOdb Library is dual-licensed, released under both the BSD 3-Clause + * and the GNU Lesser General Public Licence (LGPL) v2.1 or, at your option, + * any later version. This means you can use it in proprietary products. + * See the LICENSE.md file distributed with this source code for details. + * @license BSD-3-Clause + * @license LGPL-2.1-or-later + * + * @copyright 2000-2013 John Lim + * @copyright 2014 Damien Regad, Mark Newnham and the ADOdb community + */ // specific code for tohtml GLOBAL $gSQLMaxRows,$gSQLBlockRows,$ADODB_ROUND; @@ -17,14 +32,6 @@ $gSQLMaxRows = 1000; // max no of rows to download $gSQLBlockRows=20; // max no of rows per table block -// RecordSet to HTML Table -//------------------------------------------------------------ -// Convert a recordset to a html table. Multiple tables are generated -// if the number of rows is > $gSQLBlockRows. This is because -// web browsers normally require the whole table to be downloaded -// before it can be rendered, so we break the output into several -// smaller faster rendering tables. -// // $rs: the recordset // $ztabhtml: the table tag attributes (optional) // $zheaderarray: contains the replacement strings for the headers (optional) diff --git a/app/vendor/adodb/adodb-php/xmlschema03.dtd b/app/vendor/adodb/adodb-php/xmlschema03.dtd index 97850bc7f..351ea44b1 100644 --- a/app/vendor/adodb/adodb-php/xmlschema03.dtd +++ b/app/vendor/adodb/adodb-php/xmlschema03.dtd @@ -1,17 +1,22 @@ - - - + - + - + - + @@ -24,20 +29,25 @@ - + - + - - + + - - + + -]> \ No newline at end of file diff --git a/app/vendor/ajgl/breakpoint-twig-extension/.github/workflows/tests.yaml b/app/vendor/ajgl/breakpoint-twig-extension/.github/workflows/tests.yaml new file mode 100644 index 000000000..90487262a --- /dev/null +++ b/app/vendor/ajgl/breakpoint-twig-extension/.github/workflows/tests.yaml @@ -0,0 +1,47 @@ +name: tests + +on: + push: + pull_request: + +jobs: + tests: + runs-on: ubuntu-latest + continue-on-error: ${{ matrix.allow_failure }} + strategy: + fail-fast: false + matrix: + php: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0'] + stability: ['prefer-lowest', 'prefer-stable'] + allow_failure: [false] + include: + - php: '8.0' + stability: 'dev' + allow_failure: true + + name: ${{ matrix.php }}-${{ matrix.stability }} + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Cache dependencies + uses: actions/cache@v1 + with: + path: ~/.composer/cache/files + key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + coverage: none + + - name: Install dependencies + run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress + + - name: Check coding standard + run: composer lint + + - name: Execute tests + run: composer test || ${{ matrix.allow_failure }} diff --git a/app/vendor/ajgl/breakpoint-twig-extension/.php_cs b/app/vendor/ajgl/breakpoint-twig-extension/.php_cs deleted file mode 100644 index 881163ac1..000000000 --- a/app/vendor/ajgl/breakpoint-twig-extension/.php_cs +++ /dev/null @@ -1,31 +0,0 @@ - - -For the full copyright and license information, please view the LICENSE -file that was distributed with this source code. -EOF; - -Symfony\CS\Fixer\Contrib\HeaderCommentFixer::setHeader($header); - -return Symfony\CS\Config\Config::create() - ->setUsingCache(true) - // use default SYMFONY_LEVEL and extra fixers: - ->fixers(array( - '-psr0', - 'header_comment', - 'newline_after_open_tag', - 'ordered_use', - 'phpdoc_order', - 'strict', - 'strict_param', - )) - ->finder( - Symfony\CS\Finder\DefaultFinder::create() - ->in(__DIR__.'/src') - ->in(__DIR__.'/tests') - ) -; diff --git a/app/vendor/ajgl/breakpoint-twig-extension/.php_cs.dist b/app/vendor/ajgl/breakpoint-twig-extension/.php_cs.dist new file mode 100644 index 000000000..65878857b --- /dev/null +++ b/app/vendor/ajgl/breakpoint-twig-extension/.php_cs.dist @@ -0,0 +1,36 @@ + + +For the full copyright and license information, please view the LICENSE +file that was distributed with this source code. +EOF; + +return \PhpCsFixer\Config::create() + ->setRiskyAllowed(true) + ->setRules( + [ + '@Symfony' => true, + '@Symfony:risky' => true, + 'array_syntax' => array('syntax' => 'short'), + 'fully_qualified_strict_types' => true, + 'header_comment' => array('header' => $header), + 'native_function_invocation' => false, + 'ordered_imports' => [ + 'imports_order' => ['class', 'const', 'function'], + ], + 'phpdoc_order' => true, + 'psr4' => true, + 'strict_comparison' => true, + 'strict_param' => true, + ] + ) + ->setFinder( + \PhpCsFixer\Finder::create() + ->in(__DIR__.'/src') + ->in(__DIR__.'/tests') + ) +; diff --git a/app/vendor/ajgl/breakpoint-twig-extension/.scrutinizer.yml b/app/vendor/ajgl/breakpoint-twig-extension/.scrutinizer.yml deleted file mode 100644 index 8b19e9e4c..000000000 --- a/app/vendor/ajgl/breakpoint-twig-extension/.scrutinizer.yml +++ /dev/null @@ -1,7 +0,0 @@ -# .scrutinizer.yml -checks: - php: true - -tools: - external_code_coverage: - timeout: 900 diff --git a/app/vendor/ajgl/breakpoint-twig-extension/.travis.yml b/app/vendor/ajgl/breakpoint-twig-extension/.travis.yml deleted file mode 100644 index f443d1321..000000000 --- a/app/vendor/ajgl/breakpoint-twig-extension/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: php - -matrix: - fast_finish: true - include: - - php: 5.6 - env: COMPOSER_FLAGS="--prefer-lowest" - - php: 5.6 - - php: 7.0 - - php: 7.1 - - php: hhvm - - php: nightly - allow_failures: - - php: hhvm - - php: nightly - -install: - - composer update --prefer-dist --no-interaction $COMPOSER_FLAGS -script: vendor/bin/phpunit --coverage-clover=coverage.clover -after_script: - - wget https://scrutinizer-ci.com/ocular.phar - - php ocular.phar code-coverage:upload --format=php-clover coverage.clover diff --git a/app/vendor/ajgl/breakpoint-twig-extension/CHANGELOG.md b/app/vendor/ajgl/breakpoint-twig-extension/CHANGELOG.md index 58409ccb6..337f00c3d 100644 --- a/app/vendor/ajgl/breakpoint-twig-extension/CHANGELOG.md +++ b/app/vendor/ajgl/breakpoint-twig-extension/CHANGELOG.md @@ -4,6 +4,32 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased][unreleased] + +## [0.3.5] - 2021-02-08 + +### Added +- Add support for Symfony 5 +- Add support for Twig 3.x + + +## [0.3.4] - 2019-04-10 + +### Fixed +- Population of `$arguments` variable + + +## [0.3.3] - 2019-03-18 + +### Fixed +- Population of `$arguments` variable +- Usage of deprecated classes + + +## [0.3.2] - 2018-12-10 + +### Added +- Add support for Symfony 4 + ## [0.3.1] - 2017-11-20 ### Changed @@ -12,24 +38,31 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Fixed - Update requirements to allow twig 2.x + ## [0.3.0] - 2016-03-31 ### Added - Add `$environment` and `$context` variables - Allow to inspect function arguments + ## [0.2.0] - 2016-03-10 ### Added - Add Symfony Bundle + ## 0.1.0 - 2016-03-09 ### Added - Add `breakpoint` function -[unreleased]: https://github.com/ajgarlag/AjglBreakpointTwigExtension/compare/0.3.1...master +[unreleased]: https://github.com/ajgarlag/AjglBreakpointTwigExtension/compare/0.3.5...master +[0.3.4]: https://github.com/ajgarlag/AjglBreakpointTwigExtension/compare/0.3.4...0.3.5 +[0.3.4]: https://github.com/ajgarlag/AjglBreakpointTwigExtension/compare/0.3.3...0.3.4 +[0.3.3]: https://github.com/ajgarlag/AjglBreakpointTwigExtension/compare/0.3.2...0.3.3 +[0.3.2]: https://github.com/ajgarlag/AjglBreakpointTwigExtension/compare/0.3.1...0.3.2 [0.3.1]: https://github.com/ajgarlag/AjglBreakpointTwigExtension/compare/0.3.0...0.3.1 [0.3.0]: https://github.com/ajgarlag/AjglBreakpointTwigExtension/compare/0.2.0...0.3.0 [0.2.0]: https://github.com/ajgarlag/AjglBreakpointTwigExtension/compare/0.1.0...0.2.0 diff --git a/app/vendor/ajgl/breakpoint-twig-extension/README.md b/app/vendor/ajgl/breakpoint-twig-extension/README.md index 104d35241..18b2e7789 100644 --- a/app/vendor/ajgl/breakpoint-twig-extension/README.md +++ b/app/vendor/ajgl/breakpoint-twig-extension/README.md @@ -3,17 +3,14 @@ AjglBreakpointTwigExtension The AjglBreakpointTwigExtension component allows you set breakpoints in twig templates. -[![Build Status](https://travis-ci.org/ajgarlag/AjglBreakpointTwigExtension.png?branch=master)](https://travis-ci.org/ajgarlag/AjglBreakpointTwigExtension) +[![Build Status](https://github.com/ajgarlag/AjglBreakpointTwigExtension/workflows/tests/badge.svg?branch=master)](https://github.com/ajgarlag/AjglBreakpointTwigExtension/actions) [![Latest Stable Version](https://poser.pugx.org/ajgl/breakpoint-twig-extension/v/stable.png)](https://packagist.org/packages/ajgl/breakpoint-twig-extension) [![Latest Unstable Version](https://poser.pugx.org/ajgl/breakpoint-twig-extension/v/unstable.png)](https://packagist.org/packages/ajgl/breakpoint-twig-extension) [![Total Downloads](https://poser.pugx.org/ajgl/breakpoint-twig-extension/downloads.png)](https://packagist.org/packages/ajgl/breakpoint-twig-extension) [![Montly Downloads](https://poser.pugx.org/ajgl/breakpoint-twig-extension/d/monthly.png)](https://packagist.org/packages/ajgl/breakpoint-twig-extension) [![Daily Downloads](https://poser.pugx.org/ajgl/breakpoint-twig-extension/d/daily.png)](https://packagist.org/packages/ajgl/breakpoint-twig-extension) [![License](https://poser.pugx.org/ajgl/breakpoint-twig-extension/license.png)](https://packagist.org/packages/ajgl/breakpoint-twig-extension) -[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/ajgarlag/AjglBreakpointTwigExtension/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/ajgarlag/AjglBreakpointTwigExtension/?branch=master) -[![Code Coverage](https://scrutinizer-ci.com/g/ajgarlag/AjglBreakpointTwigExtension/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/ajgarlag/AjglBreakpointTwigExtension/?branch=master) [![SensioLabsInsight](https://insight.sensiolabs.com/projects/e0f1276d-6ded-4a20-9b3f-1a7c77a92015/mini.png)](https://insight.sensiolabs.com/projects/e0f1276d-6ded-4a20-9b3f-1a7c77a92015) -[![StyleCI](https://styleci.io/repos/53512207/shield)](https://styleci.io/repos/53512207) This component requires the [Xdebug] PHP extension to be installed. @@ -73,7 +70,12 @@ Symfony Bundle -------------- If you want to use this extension in your Symfony application, you can enable the -Symfony Bundle included in this package: +Symfony Bundle included in this package. + +The bundle will register the twig extension automatically. So, once enabled, you +can insert the `breakpoint` twig function in your templates. + +### Symfony 2/3 ```php // app/AppKernel.php @@ -82,9 +84,16 @@ if (in_array($this->getEnvironment(), array('dev', 'test'), true)) { } ``` -This bundle will register the twig extension automatically. So, once enabled, you -can insert the `breakpoint` twig function in your templates. +### Symfony 4/5 +```php +// config/bundles.php +//... +return [ + //... + Ajgl\Twig\Extension\SymfonyBundle\AjglBreakpointTwigExtensionBundle::class => ['dev' => true] +]; +``` License ------- diff --git a/app/vendor/ajgl/breakpoint-twig-extension/composer.json b/app/vendor/ajgl/breakpoint-twig-extension/composer.json index a6741b043..cf466f2e2 100644 --- a/app/vendor/ajgl/breakpoint-twig-extension/composer.json +++ b/app/vendor/ajgl/breakpoint-twig-extension/composer.json @@ -20,18 +20,33 @@ }, "require": { "php": ">=5.6", - "twig/twig": "^1.14|^2.0" + "twig/twig": "^1.34|^2.0|^3.0" }, "require-dev": { - "symfony/framework-bundle": "^2.7|^3.2", - "symfony/twig-bundle": "^2.7|^3.2", - "phpunit/phpunit": "^5" + "friendsofphp/php-cs-fixer": "^2.18", + "symfony/framework-bundle": "^2.7|^3.4|^4.4|^5.2", + "symfony/phpunit-bridge": "^4.4|^5.2", + "symfony/twig-bundle": "^2.7|^3.4|^4.4|^5.2" }, "suggest": { "ext-xdebug": "The Xdebug extension is required for the breakpoint to work", "symfony/framework-bundle": "The framework bundle to integrate the extension into Symfony", "symfony/twig-bundle": "The twig bundle to integrate the extension into Symfony" }, + "scripts": { + "fix-cs": [ + "vendor/bin/php-cs-fixer fix --ansi" + ], + "lint": [ + "vendor/bin/php-cs-fixer fix --dry-run --ansi" + ], + "test": [ + "vendor/bin/simple-phpunit --colors=always" + ] + }, + "config": { + "sort-packages": true + }, "extra": { "branch-alias": { "dev-master": "0.3.x-dev" diff --git a/app/vendor/ajgl/breakpoint-twig-extension/src/BreakpointExtension.php b/app/vendor/ajgl/breakpoint-twig-extension/src/BreakpointExtension.php index ed9df17df..f839d6835 100644 --- a/app/vendor/ajgl/breakpoint-twig-extension/src/BreakpointExtension.php +++ b/app/vendor/ajgl/breakpoint-twig-extension/src/BreakpointExtension.php @@ -11,13 +11,14 @@ namespace Ajgl\Twig\Extension; -use Twig_Environment; -use Twig_Extension; +use Twig\Environment; +use Twig\Extension\AbstractExtension; +use Twig\TwigFunction; /** * @author Antonio J. García Lagar */ -class BreakpointExtension extends Twig_Extension +class BreakpointExtension extends AbstractExtension { public function getName() { @@ -26,21 +27,22 @@ public function getName() public function getFunctions() { - return array( - new \Twig_SimpleFunction('breakpoint', array($this, 'setBreakpoint'), array('needs_environment' => true, 'needs_context' => true)), - ); + return [ + new TwigFunction('breakpoint', [$this, 'setBreakpoint'], ['needs_environment' => true, 'needs_context' => true]), + ]; } /** - * If XDebug is detected, makes the debugger break. + * If Xdebug is detected, makes the debugger break. * - * @param Twig_Environment $environment the environment instance - * @param mixed $context variables from the Twig template + * @param Environment $environment the environment instance + * @param mixed $context variables from the Twig template */ - public function setBreakpoint(Twig_Environment $environment, $context) + public function setBreakpoint(Environment $environment, $context) { if (function_exists('xdebug_break')) { - $arguments = array_slice(func_get_args(), 2); + $arguments = func_get_args(); + $arguments = array_slice($arguments, 2); xdebug_break(); } } diff --git a/app/vendor/ajgl/breakpoint-twig-extension/tests/BreakpointExtensionTest.php b/app/vendor/ajgl/breakpoint-twig-extension/tests/BreakpointExtensionTest.php index 62bf7a2b5..b4316ab35 100644 --- a/app/vendor/ajgl/breakpoint-twig-extension/tests/BreakpointExtensionTest.php +++ b/app/vendor/ajgl/breakpoint-twig-extension/tests/BreakpointExtensionTest.php @@ -12,18 +12,23 @@ namespace Ajgl\Twig\Extension\Tests; use Ajgl\Twig\Extension\BreakpointExtension; +use PHPUnit\Framework\TestCase; +use Symfony\Bridge\PhpUnit\SetUpTearDownTrait; +use Twig\TwigFunction; /** * @author Antonio J. García Lagar */ -class BreakpointExtensionTest extends \PHPUnit_Framework_TestCase +class BreakpointExtensionTest extends TestCase { + use SetUpTearDownTrait; + /** * @var BreakpointExtension */ protected $extension; - protected function setUp() + protected function doSetUp() { $this->extension = new BreakpointExtension(); } @@ -38,7 +43,7 @@ public function testGetFunctions() $functions = $this->extension->getFunctions(); $this->assertCount(1, $functions); $function = reset($functions); - $this->assertInstanceOf('Twig_SimpleFunction', $function); + $this->assertInstanceOf(TwigFunction::class, $function); $callable = $function->getCallable(); $this->assertTrue(is_array($callable)); $this->assertCount(2, $callable); diff --git a/app/vendor/ajgl/breakpoint-twig-extension/tests/SymfonyBundle/DependencyInjection/AjglBreakpointTwigExtensionExtensionTest.php b/app/vendor/ajgl/breakpoint-twig-extension/tests/SymfonyBundle/DependencyInjection/AjglBreakpointTwigExtensionExtensionTest.php index 3b3aa9fbe..f3eebbf80 100644 --- a/app/vendor/ajgl/breakpoint-twig-extension/tests/SymfonyBundle/DependencyInjection/AjglBreakpointTwigExtensionExtensionTest.php +++ b/app/vendor/ajgl/breakpoint-twig-extension/tests/SymfonyBundle/DependencyInjection/AjglBreakpointTwigExtensionExtensionTest.php @@ -12,13 +12,17 @@ namespace Ajgl\Twig\Extension\Tests\SymfonyBundle\DependencyInjection; use Ajgl\Twig\Extension\SymfonyBundle\DependencyInjection\AjglBreakpointTwigExtensionExtension; +use PHPUnit\Framework\TestCase; +use Symfony\Bridge\PhpUnit\SetUpTearDownTrait; use Symfony\Component\DependencyInjection\ContainerBuilder; /** * @author Antonio J. García Lagar */ -class AjglBreakpointTwigExtensionExtensionTest extends \PHPUnit_Framework_TestCase +class AjglBreakpointTwigExtensionExtensionTest extends TestCase { + use SetUpTearDownTrait; + /** * @var ContainerBuilder */ @@ -29,7 +33,7 @@ class AjglBreakpointTwigExtensionExtensionTest extends \PHPUnit_Framework_TestCa */ protected $extension; - protected function setUp() + protected function doSetUp() { $this->container = new ContainerBuilder(); $this->extension = new AjglBreakpointTwigExtensionExtension(); @@ -37,7 +41,7 @@ protected function setUp() public function testTwigExtensionsDefinition() { - $this->extension->load(array(), $this->container); + $this->extension->load([], $this->container); $this->assertTrue($this->container->hasDefinition('ajgl_twig_extension.breakpoint')); $definition = $this->container->getDefinition('ajgl_twig_extension.breakpoint'); $this->assertSame( diff --git a/app/vendor/asm89/twig-cache-extension/.travis.yml b/app/vendor/asm89/twig-cache-extension/.travis.yml index c9fed9788..c13804168 100644 --- a/app/vendor/asm89/twig-cache-extension/.travis.yml +++ b/app/vendor/asm89/twig-cache-extension/.travis.yml @@ -1,36 +1,44 @@ language: php -cache: - directories: - - vendor - - $HOME/.composer/cache - -env: - - TWIG_VERSION="^1.0" - - TWIG_VERSION="^2.0" - -php: - - 5.3 - - 5.4 - - 5.5 - - 5.6 - - 7.0 - - 7.1 - - hhvm - matrix: - exclude: - - php: 5.3 - env: TWIG_VERSION="^2.0" - - php: 5.4 - env: TWIG_VERSION="^2.0" - - php: 5.5 - env: TWIG_VERSION="^2.0" - - php: 5.6 - env: TWIG_VERSION="^2.0" - - php: hhvm - env: TWIG_VERSION="^2.0" + include: + - php: 5.6 + dist: xenial + env: 'COMPOSER_FLAGS="--prefer-stable --prefer-lowest" TWIG_VERSION="^1.0"' + - php: 5.6 + dist: xenial + env: TWIG_VERSION="^1.0" + - php: 7.0 + dist: xenial + env: TWIG_VERSION="^1.0" + - php: 7.1 + dist: bionic + env: TWIG_VERSION="^1.0" + - php: 7.2 + dist: bionic + env: TWIG_VERSION="^1.0" + - php: 7.3 + dist: bionic + env: TWIG_VERSION="^1.0" + - php: 7.4 + dist: bionic + env: TWIG_VERSION="^1.0" + - php: 7.0 + dist: xenial + env: TWIG_VERSION="^2.0" + - php: 7.1 + dist: bionic + env: TWIG_VERSION="^2.0" + - php: 7.2 + dist: bionic + env: TWIG_VERSION="^2.0" + - php: 7.3 + dist: bionic + env: TWIG_VERSION="^2.0" + - php: 7.4 + dist: bionic + env: TWIG_VERSION="^2.0" install: composer require twig/twig:${TWIG_VERSION} -script: phpunit +script: composer test diff --git a/app/vendor/asm89/twig-cache-extension/composer.json b/app/vendor/asm89/twig-cache-extension/composer.json index 34db8cd46..176befbf1 100644 --- a/app/vendor/asm89/twig-cache-extension/composer.json +++ b/app/vendor/asm89/twig-cache-extension/composer.json @@ -16,8 +16,12 @@ "twig/twig": "^1.0|^2.0" }, "require-dev": { + "phpunit/phpunit": "^5.0 || ^4.8.10", "doctrine/cache": "~1.0" }, + "scripts": { + "test": "phpunit" + }, "suggest": { "psr/cache-implementation": "To make use of PSR-6 cache implementation via PsrCacheAdapter." }, @@ -33,7 +37,7 @@ }, "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "1.4-dev" } } } diff --git a/app/vendor/asm89/twig-cache-extension/lib/Asm89/Twig/CacheExtension/Extension.php b/app/vendor/asm89/twig-cache-extension/lib/Asm89/Twig/CacheExtension/Extension.php index 3a7ace884..b7c653b3d 100644 --- a/app/vendor/asm89/twig-cache-extension/lib/Asm89/Twig/CacheExtension/Extension.php +++ b/app/vendor/asm89/twig-cache-extension/lib/Asm89/Twig/CacheExtension/Extension.php @@ -42,7 +42,7 @@ public function getCacheStrategy() public function getName() { if (version_compare(\Twig_Environment::VERSION, '1.26.0', '>=')) { - return get_class($this); + return __CLASS__; } return 'asm89_cache'; } diff --git a/app/vendor/asm89/twig-cache-extension/test/Asm89/Twig/CacheExtension/Tests/CacheProvider/DoctrineCacheAdapterTest.php b/app/vendor/asm89/twig-cache-extension/test/Asm89/Twig/CacheExtension/Tests/CacheProvider/DoctrineCacheAdapterTest.php index 4642ec058..bea9851ab 100644 --- a/app/vendor/asm89/twig-cache-extension/test/Asm89/Twig/CacheExtension/Tests/CacheProvider/DoctrineCacheAdapterTest.php +++ b/app/vendor/asm89/twig-cache-extension/test/Asm89/Twig/CacheExtension/Tests/CacheProvider/DoctrineCacheAdapterTest.php @@ -41,6 +41,6 @@ public function testSave() public function createCacheMock() { - return $this->getMock('Doctrine\Common\Cache\Cache'); + return $this->createMock('Doctrine\Common\Cache\Cache'); } } diff --git a/app/vendor/asm89/twig-cache-extension/test/Asm89/Twig/CacheExtension/Tests/CacheStrategy/GenerationCacheStrategyTest.php b/app/vendor/asm89/twig-cache-extension/test/Asm89/Twig/CacheExtension/Tests/CacheStrategy/GenerationCacheStrategyTest.php index 5084d219d..d74ecdee9 100644 --- a/app/vendor/asm89/twig-cache-extension/test/Asm89/Twig/CacheExtension/Tests/CacheStrategy/GenerationCacheStrategyTest.php +++ b/app/vendor/asm89/twig-cache-extension/test/Asm89/Twig/CacheExtension/Tests/CacheStrategy/GenerationCacheStrategyTest.php @@ -70,11 +70,11 @@ public function getLifetimes() public function createKeyGeneratorMock() { - return $this->getMock('Asm89\Twig\CacheExtension\CacheStrategy\KeyGeneratorInterface'); + return $this->createMock('Asm89\Twig\CacheExtension\CacheStrategy\KeyGeneratorInterface'); } public function createCacheProviderMock() { - return $this->getMock('Asm89\Twig\CacheExtension\CacheProviderInterface'); + return $this->createMock('Asm89\Twig\CacheExtension\CacheProviderInterface'); } } diff --git a/app/vendor/asm89/twig-cache-extension/test/Asm89/Twig/CacheExtension/Tests/CacheStrategy/IndexedChainingCacheStrategyTest.php b/app/vendor/asm89/twig-cache-extension/test/Asm89/Twig/CacheExtension/Tests/CacheStrategy/IndexedChainingCacheStrategyTest.php index 3a68a09f5..480a0b1a5 100644 --- a/app/vendor/asm89/twig-cache-extension/test/Asm89/Twig/CacheExtension/Tests/CacheStrategy/IndexedChainingCacheStrategyTest.php +++ b/app/vendor/asm89/twig-cache-extension/test/Asm89/Twig/CacheExtension/Tests/CacheStrategy/IndexedChainingCacheStrategyTest.php @@ -75,6 +75,6 @@ public function getStrategies() public function createCacheStrategyMock() { - return $this->getMock('Asm89\Twig\CacheExtension\CacheStrategyInterface'); + return $this->createMock('Asm89\Twig\CacheExtension\CacheStrategyInterface'); } } diff --git a/app/vendor/asm89/twig-cache-extension/test/Asm89/Twig/CacheExtension/Tests/CacheStrategy/LifetimeCacheStrategyTest.php b/app/vendor/asm89/twig-cache-extension/test/Asm89/Twig/CacheExtension/Tests/CacheStrategy/LifetimeCacheStrategyTest.php index 48905e424..10d1a8688 100644 --- a/app/vendor/asm89/twig-cache-extension/test/Asm89/Twig/CacheExtension/Tests/CacheStrategy/LifetimeCacheStrategyTest.php +++ b/app/vendor/asm89/twig-cache-extension/test/Asm89/Twig/CacheExtension/Tests/CacheStrategy/LifetimeCacheStrategyTest.php @@ -63,6 +63,6 @@ public function getInvalidLifetimeValues() public function createCacheProviderMock() { - return $this->getMock('Asm89\Twig\CacheExtension\CacheProviderInterface'); + return $this->createMock('Asm89\Twig\CacheExtension\CacheProviderInterface'); } } diff --git a/app/vendor/bin/var-dump-server b/app/vendor/bin/var-dump-server new file mode 120000 index 000000000..6bd4e93db --- /dev/null +++ b/app/vendor/bin/var-dump-server @@ -0,0 +1 @@ +../symfony/var-dumper/Resources/bin/var-dump-server \ No newline at end of file diff --git a/app/vendor/cakephp/bake/Dockerfile b/app/vendor/cakephp/bake/Dockerfile new file mode 100644 index 000000000..296613920 --- /dev/null +++ b/app/vendor/cakephp/bake/Dockerfile @@ -0,0 +1,24 @@ +# Basic docker based environment +# Necessary to trick dokku into building the documentation +# using dockerfile instead of herokuish +FROM ubuntu:17.04 + +# Add basic tools +RUN apt-get update && \ + apt-get install -y build-essential \ + software-properties-common \ + curl \ + git \ + libxml2 \ + libffi-dev \ + libssl-dev + +RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php && \ + apt-get update && \ + apt-get install -y php7.2-cli php7.2-mbstring php7.2-xml php7.2-zip php7.2-intl php7.2-opcache php7.2-sqlite + +WORKDIR /code + +VOLUME ["/code"] + +CMD [ '/bin/bash' ] diff --git a/app/vendor/cakephp/bake/LICENSE.txt b/app/vendor/cakephp/bake/LICENSE.txt index 5849d31d4..0a0a98c8e 100644 --- a/app/vendor/cakephp/bake/LICENSE.txt +++ b/app/vendor/cakephp/bake/LICENSE.txt @@ -1,7 +1,7 @@ The MIT License CakePHP(tm) : The Rapid Development PHP Framework (http://cakephp.org) -Copyright (c) 2005-2018, Cake Software Foundation, Inc. +Copyright (c) 2005-present, Cake Software Foundation, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), diff --git a/app/vendor/cakephp/bake/README.md b/app/vendor/cakephp/bake/README.md index 7c6344e5e..621d2a8d8 100644 --- a/app/vendor/cakephp/bake/README.md +++ b/app/vendor/cakephp/bake/README.md @@ -19,7 +19,7 @@ composer require --dev cakephp/bake ## Documentation -You can find the documentation for bake [on the cookbook](http://book.cakephp.org/3.0/en/bake.html). +You can find the documentation for bake [on its own cookbook](https://book.cakephp.org/bake/1.x/en/index.html). ## Testing diff --git a/app/vendor/cakephp/bake/composer.json b/app/vendor/cakephp/bake/composer.json index 05ef8a9f5..677841f9c 100644 --- a/app/vendor/cakephp/bake/composer.json +++ b/app/vendor/cakephp/bake/composer.json @@ -13,15 +13,15 @@ ], "support": { "issues": "https://github.com/cakephp/bake/issues", - "forum": "http://stackoverflow.com/tags/cakephp", + "forum": "https://stackoverflow.com/tags/cakephp", "irc": "irc://irc.freenode.org/cakephp", "source": "https://github.com/cakephp/bake" }, "require": { "php": ">=5.6.0", - "cakephp/cakephp": "^3.6.0", + "cakephp/cakephp": "^3.8.0", "cakephp/plugin-installer": "^1.0", - "wyrihaximus/twig-view": "^4.3.4" + "wyrihaximus/twig-view": "^4.3.7" }, "require-dev": { "cakephp/cakephp-codesniffer": "^3.0", @@ -29,16 +29,28 @@ }, "autoload": { "psr-4": { - "Bake\\": "src" + "Bake\\": "src/" } }, "autoload-dev": { "psr-4": { - "BakeTest\\": "tests/test_app/Plugin/BakeTest/src", - "Pastry\\PastryTest\\": "tests/test_app/Plugin/PastryTest/src", - "Bake\\Test\\": "tests", - "Bake\\Test\\App\\": "tests/test_app/App", - "Cake\\Test\\": "./vendor/cakephp/cakephp/tests" + "BakeTest\\": "tests/test_app/Plugin/BakeTest/src/", + "Pastry\\PastryTest\\": "tests/test_app/Plugin/PastryTest/src/", + "Bake\\Test\\": "tests/", + "Bake\\Test\\App\\": "tests/test_app/App/", + "Cake\\Test\\": "./vendor/cakephp/cakephp/tests/" } + }, + "scripts": { + "check": [ + "@test", + "@cs-check" + ], + "cs-check": "phpcs --parallel=16 -p src/ tests/", + "cs-fix": "phpcbf --parallel=16 -p src/ tests/", + "phpstan": "phpstan analyse src/", + "phpstan-setup": "cp composer.json composer.backup && composer require --dev phpstan/phpstan-shim:^0.11 && mv composer.backup composer.json", + "test": "phpunit", + "test-coverage": "phpunit --coverage-clover=clover.xml" } } diff --git a/app/vendor/cakephp/bake/docs.Dockerfile b/app/vendor/cakephp/bake/docs.Dockerfile new file mode 100644 index 000000000..adb6e9447 --- /dev/null +++ b/app/vendor/cakephp/bake/docs.Dockerfile @@ -0,0 +1,18 @@ +# Generate the HTML output. +FROM markstory/cakephp-docs-builder as builder + +# Copy entire repo in with .git so we can build all versions in one image. +COPY docs /data/src + +RUN cd /data/docs-builder \ + && make website LANGS="en es fr ja pt ru" SOURCE=/data/src DEST=/data/website/ + +# Build a small nginx container with just the static site in it. +FROM nginx:1.15-alpine + +COPY --from=builder /data/website /data/website +COPY --from=builder /data/docs-builder/nginx.conf /etc/nginx/conf.d/default.conf + +# Copy docs into place. +RUN cp -R /data/website/html/* /usr/share/nginx/html \ + && rm -rf /data/website diff --git a/app/vendor/psy/psysh/test/fixtures/default/.config/psysh/psysh_history b/app/vendor/cakephp/bake/docs/config/__init__.py similarity index 100% rename from app/vendor/psy/psysh/test/fixtures/default/.config/psysh/psysh_history rename to app/vendor/cakephp/bake/docs/config/__init__.py diff --git a/app/vendor/cakephp/bake/docs/config/all.py b/app/vendor/cakephp/bake/docs/config/all.py new file mode 100644 index 000000000..b74fcbe0b --- /dev/null +++ b/app/vendor/cakephp/bake/docs/config/all.py @@ -0,0 +1,49 @@ +# Global configuration information used across all the +# translations of documentation. +# +# Import the base theme configuration +from cakephpsphinx.config.all import * + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# + +# The full version, including alpha/beta/rc tags. +release = '1.x' + +# The search index version. +search_version = 'bake-1' + +# The marketing display name for the book. +version_name = '' + +# Project name shown in the black header bar +project = 'CakePHP Bake' + +# Other versions that display in the version picker menu. +version_list = [ + {'name': '1.x', 'number': '/bake/1.x', 'title': '1.x', 'current': True}, + # {'name': '2.x', 'number': '/bake/2.x', 'title': '2.x'}, +] + +# Languages available. +languages = ['en', 'es', 'fr', 'ja', 'pt', 'ru'] + +# The GitHub branch name for this version of the docs +# for edit links to point at. +branch = 'master' + +# Current version being built +version = '1.x' + +# Language in use for this directory. +language = 'en' + +show_root_link = True + +repository = 'cakephp/bake' + +source_path = 'docs/' + +hide_page_contents = ('search', '404', 'contents') diff --git a/app/vendor/cakephp/bake/docs/en/conf.py b/app/vendor/cakephp/bake/docs/en/conf.py new file mode 100644 index 000000000..f638bda22 --- /dev/null +++ b/app/vendor/cakephp/bake/docs/en/conf.py @@ -0,0 +1,9 @@ +import sys, os + +# Append the top level directory of the docs, so we can import from the config dir. +sys.path.insert(0, os.path.abspath('..')) + +# Pull in all the configuration options defined in the global config file.. +from config.all import * + +language = 'en' diff --git a/app/vendor/cakephp/bake/docs/en/contents.rst b/app/vendor/cakephp/bake/docs/en/contents.rst new file mode 100644 index 000000000..08c3e957c --- /dev/null +++ b/app/vendor/cakephp/bake/docs/en/contents.rst @@ -0,0 +1,7 @@ +.. toctree:: + :maxdepth: 2 + :caption: CakePHP Bake + + /index + /usage + /development diff --git a/app/vendor/cakephp/bake/docs/en/development.rst b/app/vendor/cakephp/bake/docs/en/development.rst new file mode 100644 index 000000000..68eebdbd4 --- /dev/null +++ b/app/vendor/cakephp/bake/docs/en/development.rst @@ -0,0 +1,304 @@ +Extending Bake +############## + +Bake features an extensible architecture that allows your application or plugins +to modify or add-to the base functionality. Bake makes use of a dedicated +view class which uses the `Twig `_ template engine. + +Bake Events +=========== + +As a view class, ``BakeView`` emits the same events as any other view class, +plus one extra initialize event. However, whereas standard view classes use the +event prefix "View.", ``BakeView`` uses the event prefix "Bake.". + +The initialize event can be used to make changes which apply to all baked +output, for example to add another helper to the bake view class this event can +be used:: + + on('Bake.initialize', function (Event $event) { + $view = $event->getSubject(); + + // In my bake templates, allow the use of the MySpecial helper + $view->loadHelper('MySpecial', ['some' => 'config']); + + // And add an $author variable so it's always available + $view->set('author', 'Andy'); + + }); + +If you want to modify bake from within another plugin, putting your plugin's +bake events in the plugin ``config/bootstrap.php`` file is a good idea. + +Bake events can be handy for making small changes to existing templates. +For example, to change the variable names used when baking controller/template +files one can use a function listening for ``Bake.beforeRender`` to modify the +variables used in the bake templates:: + + on('Bake.beforeRender', function (Event $event) { + $view = $event->getSubject(); + + // Use $rows for the main data variable in indexes + if ($view->get('pluralName')) { + $view->set('pluralName', 'rows'); + } + if ($view->get('pluralVar')) { + $view->set('pluralVar', 'rows'); + } + + // Use $theOne for the main data variable in view/edit + if ($view->get('singularName')) { + $view->set('singularName', 'theOne'); + } + if ($view->get('singularVar')) { + $view->set('singularVar', 'theOne'); + } + + }); + +You may also scope the ``Bake.beforeRender`` and ``Bake.afterRender`` events to +a specific generated file. For instance, if you want to add specific actions to +your UsersController when generating from a **Controller/controller.twig** file, +you can use the following event:: + + on( + 'Bake.beforeRender.Controller.controller', + function (Event $event) { + $view = $event->getSubject(); + if ($view->viewVars['name'] == 'Users') { + // add the login and logout actions to the Users controller + $view->set('actions', [ + 'login', + 'logout', + 'index', + 'view', + 'add', + 'edit', + 'delete' + ]); + } + } + ); + +By scoping event listeners to specific bake templates, you can simplify your +bake related event logic and provide callbacks that are easier to test. + +Bake Template Syntax +==================== + +Bake template files use the `Twig `__ template syntax. + +One way to see/understand how bake templates works, especially when attempting +to modify bake template files, is to bake a class and compare the template used +with the pre-processed template file which is left in the application's +**tmp/bake** folder. + +So, for example, when baking a shell like so: + +.. code-block:: bash + + bin/cake bake shell Foo + +The template used (**vendor/cakephp/bake/src/Template/Bake/Shell/shell.twig**) +looks like this:: + + `` A Bake template php close tag + * ``<%=`` A Bake template php short-echo tag + * ``<%-`` A Bake template php open tag, stripping any leading whitespace + before the tag + * ``-%>`` A Bake template php close tag, stripping trailing whitespace after + the tag + +.. _creating-a-bake-theme: + +Creating a Bake Theme +===================== + +If you wish to modify the output produced by the "bake" command, you can +create your own bake 'theme' which allows you to replace some or all of the +templates that bake uses. The best way to do this is: + +#. Bake a new plugin. The name of the plugin is the bake 'theme' name +#. Create a new directory **plugins/[name]/src/Template/Bake/Template/**. +#. Copy any templates you want to override from + **vendor/cakephp/bake/src/Template/Bake/Template** to matching files in your + plugin. +#. When running bake use the ``--theme`` option to specify the bake-theme you + want to use. To avoid having to specify this option in each call, you can also + set your custom theme to be used as default theme:: + + Test->classSuffixes[$this->name()])) { + $this->Test->classSuffixes[$this->name()] = 'Foo'; + } + + $name = ucfirst($this->name()); + if (!isset($this->Test->classTypes[$name])) { + $this->Test->classTypes[$name] = 'Foo'; + } + + return parent::bakeTest($className); + } + +* The **class suffix** will be appened to the name provided in your ``bake`` + call. In the previous example, it would create a ``ExampleFooTest.php`` file. +* The **class type** will be the sub-namespace used that will lead to your + file (relative to the app or the plugin you are baking into). In the previous + example, it would create your test with the namespace ``App\Test\TestCase\Foo`` + . + +.. meta:: + :title lang=en: Extending Bake + :keywords lang=en: command line interface,development,bake view, bake template syntax,twig,erb tags,percent tags + diff --git a/app/vendor/cakephp/bake/docs/en/index.rst b/app/vendor/cakephp/bake/docs/en/index.rst new file mode 100644 index 000000000..1020e904f --- /dev/null +++ b/app/vendor/cakephp/bake/docs/en/index.rst @@ -0,0 +1,28 @@ +Bake Console +############ + +CakePHP's bake console is another effort to get you up and running in CakePHP +– fast. The bake console can create any of CakePHP's basic ingredients: models, +behaviors, views, helpers, controllers, components, test cases, fixtures and plugins. +And we aren't just talking skeleton classes: Bake can create a fully functional +application in just a few minutes. In fact, Bake is a natural step to take once +an application has been scaffolded. + +Installation +============ + +Before trying to use or extend bake, make sure it is installed in your +application. Bake is provided as a plugin that you can install with Composer:: + + composer require --dev cakephp/bake:~1.0 + +The above will install bake as a development dependency. This means that it will +not be installed when you do production deployments. + +When using the Twig templates make sure you are loading the +``WyriHaximus/TwigView`` plugin with its bootstrap. You can also omit it +completely which then makes Bake plugin load this plugin on demand. + +.. meta:: + :title lang=en: Bake Console + :keywords lang=en: command line interface,development,bake view, bake template syntax,erb tags,asp tags,percent tags diff --git a/app/vendor/cakephp/bake/docs/en/usage.rst b/app/vendor/cakephp/bake/docs/en/usage.rst new file mode 100644 index 000000000..956efe0cc --- /dev/null +++ b/app/vendor/cakephp/bake/docs/en/usage.rst @@ -0,0 +1,133 @@ +Code Generation with Bake +######################### + +The cake console is run using the PHP CLI (command line interface). +If you have problems running the script, ensure that: + +#. You have the PHP CLI installed and that it has the proper modules enabled + (eg: MySQL, intl). +#. Users also might have issues if the database host is 'localhost' and should + try '127.0.0.1' instead, as localhost can cause issues with PHP CLI. +#. Depending on how your computer is configured, you may have to set execute + rights on the cake bash script to call it using ``bin/cake bake``. + +Before running bake you should make sure you have at least one database +connection configured. + +When run with no arguments ``bin/cake bake`` will output a list of available +tasks. + +For windows system try with ``bin\cake bake``. + +You should see something like:: + + $ bin/cake bake + + Welcome to CakePHP v3.4.6 Console + --------------------------------------------------------------- + App : src + Path: /var/www/cakephp.dev/src/ + PHP : 5.6.20 + --------------------------------------------------------------- + The following commands can be used to generate skeleton code for your application. + + Available bake commands: + + - all + - behavior + - cell + - component + - controller + - fixture + - form + - helper + - mailer + - migration + - migration_diff + - migration_snapshot + - model + - plugin + - seed + - shell + - shell_helper + - task + - template + - test + + By using `cake bake [name]` you can invoke a specific bake task. + +You can get more information on what each task does, and what options are +available using the ``--help`` option:: + + $ bin/cake bake --help + + Welcome to CakePHP v3.4.6 Console + --------------------------------------------------------------- + App : src + Path: /var/www/cakephp.dev/src/ + PHP : 5.6.20 + --------------------------------------------------------------- + The Bake script generates controllers, models and template files for + your application. If run with no command line arguments, Bake guides the + user through the class creation process. You can customize the + generation process by telling Bake where different parts of your + application are using command line arguments. + + Usage: + cake bake.bake [subcommand] [options] + + Subcommands: + + all Bake a complete MVC skeleton. + behavior Bake a behavior class file. + cell Bake a cell class file. + component Bake a component class file. + controller Bake a controller skeleton. + fixture Generate fixtures for use with the test suite. You + can use `bake fixture all` to bake all fixtures. + form Bake a form class file. + helper Bake a helper class file. + mailer Bake a mailer class file. + migration Bake migration class. + migration_diff Bake migration class. + migration_snapshot Bake migration snapshot class. + model Bake table and entity classes. + plugin Create the directory structure, AppController class + and testing setup for a new plugin. Can create + plugins in any of your bootstrapped plugin paths. + seed Bake seed class. + shell Bake a shell class file. + shell_helper Bake a shell_helper class file. + task Bake a task class file. + template Bake views for a controller, using built-in or + custom templates. + test Bake test case skeletons for classes. + + To see help on a subcommand use `cake bake.bake [subcommand] --help` + + Options: + + --connection, -c Database connection to use in conjunction with `bake + all`. (default: default) + --everything Bake a complete MVC skeleton, using all the available + tables. Usage: "bake all --everything" + --force, -f Force overwriting existing files without prompting. + --help, -h Display this help. + --plugin, -p Plugin to bake into. + --prefix Prefix to bake controllers and templates into. + --quiet, -q Enable quiet output. + --tablePrefix Table prefix to be used in models. + --theme, -t The theme to use when baking code. (choices: + Bake|Migrations) + --verbose, -v Enable verbose output. + +Bake Themes +=========== + +The theme option is common to all bake commands, and allows changing the bake +template files used when baking. To create your own templates, see the +:ref:`bake theme creation documentation `. + +.. meta:: + :title lang=en: Code Generation with Bake + :keywords lang=en: command line interface,functional application,database,database configuration,bash script,basic ingredients,project,model,path path,code generation,scaffolding,windows users,configuration file,few minutes,config,iew,shell,models,running,mysql diff --git a/app/vendor/cakephp/bake/docs/es/conf.py b/app/vendor/cakephp/bake/docs/es/conf.py new file mode 100644 index 000000000..4691ece6a --- /dev/null +++ b/app/vendor/cakephp/bake/docs/es/conf.py @@ -0,0 +1,9 @@ +import sys, os + +# Append the top level directory of the docs, so we can import from the config dir. +sys.path.insert(0, os.path.abspath('..')) + +# Pull in all the configuration options defined in the global config file.. +from config.all import * + +language = 'es' diff --git a/app/vendor/cakephp/bake/docs/es/contents.rst b/app/vendor/cakephp/bake/docs/es/contents.rst new file mode 100644 index 000000000..08c3e957c --- /dev/null +++ b/app/vendor/cakephp/bake/docs/es/contents.rst @@ -0,0 +1,7 @@ +.. toctree:: + :maxdepth: 2 + :caption: CakePHP Bake + + /index + /usage + /development diff --git a/app/vendor/cakephp/bake/docs/es/development.rst b/app/vendor/cakephp/bake/docs/es/development.rst new file mode 100644 index 000000000..7f717d051 --- /dev/null +++ b/app/vendor/cakephp/bake/docs/es/development.rst @@ -0,0 +1,17 @@ +Extending Bake +############## + +.. note:: + La documentación no es compatible actualmente con el idioma español en esta página. + + Por favor, siéntase libre de enviarnos un pull request en + `Github `_ o utilizar el botón **Improve this Doc** para proponer directamente los cambios. + + Usted puede hacer referencia a la versión en Inglés en el menú de selección superior + para obtener información sobre el tema de esta página. + +.. _creating-a-bake-theme: + +.. meta:: + :title lang=es: Extending Bake + :keywords lang=es: command line interface,development,bake view, bake template syntax,erb tags,asp tags,percent tags diff --git a/app/vendor/cakephp/bake/docs/es/index.rst b/app/vendor/cakephp/bake/docs/es/index.rst new file mode 100644 index 000000000..80f1fa654 --- /dev/null +++ b/app/vendor/cakephp/bake/docs/es/index.rst @@ -0,0 +1,31 @@ +Consola bake +############ + +La consola bake de CakePHP es otro esfuerzo para preparar y ejecutar CakePHP rápidamente. + +La consola bake puede crear cualquiera de los ingredientes básicos de CakePHP: +modelos, behaviours, vistas, helpers, controladores, componentes, casos de +prueba, fixtures y plugins. + +Y no hablamos sólo de esqueletos de clases: Bake puede crear una aplicación +totalmente funcional en solo un par de minutos. + +De hecho, Bake es un paso natural a dar una vez ha sido creado el esqueleto de +la aplicación. + +Instalación +=========== + +Antes de intentar utilizar o extender bake asegúrate de que está instalado en tu +aplicación. + +Bake está incluido como un plugin que puedes instalar con Composer:: + + composer require --dev cakephp/bake:~1.0 + +La instrucción anterior instalará bake como una dependencia de desarrollo. Esto +significa que no será instalado cuando hagas despliegues en producción. + +.. meta:: + :title lang=es: Consola Bake + :keywords lang=es: interfaz de línea de comando,desarrollo,bake vista, bake sintaxis plantilla,erb tags,asp tags,percent tags diff --git a/app/vendor/cakephp/bake/docs/es/usage.rst b/app/vendor/cakephp/bake/docs/es/usage.rst new file mode 100644 index 000000000..dad6ffd95 --- /dev/null +++ b/app/vendor/cakephp/bake/docs/es/usage.rst @@ -0,0 +1,115 @@ +Crear código con Bake +##################### + +La consola de CAKE se ejecuta usando PHP CLI (command line interface). +Si tiene problemas para ejecutar el script, asegurese de: + +#. Tener instalado el PHP CLI y que estén los módulos correspondientes + habilitados (ej: MySQL y intl). +#. Si el host de base de datos es 'localhost', intente realizar la conexión con + el ip '127.0.0.1'. En algunos casos PHP CLI tiene problemas al referenciar + por nombre de host (localhost). +#. Dependiendo de como esté configurado su equipo, la ejecución del comando + CAKE BAKE (cake bash script) puede requerir permisos de ejecución al + lanzar ``bin/cake bake``. + +Antes de comenzar la ejecución, asegúrese de disponer al menos de una conexión +a una base de datos configurada. + +Para comenzar con la ejecución del comando debe abrir la consola de windows +y ejecutar "Cake Bake" + +#. Ir a Inicio (Start) > Ejecutar (Run) +#. Escribir "cmd" y presionar 'Enter' +#. Navegar hasta llegar a la carpeta de instalación de cake +#. Acceder a la carpeta 'bin' +#. Escribir 'Cake bake' lo cual deberá devolver un listado con todas las + tareas/actividades disponibles. + +El resultado debería ser algo similar a lo siguiente:: + + $ bin/cake bake + + Welcome to CakePHP v3.1.6 Console + --------------------------------------------------------------- + App : src + Path: /var/www/cakephp.dev/src/ + PHP: 5.5.8 + --------------------------------------------------------------- + The following commands can be used to generate skeleton code for your application. + + Available bake commands: + + - all + - behavior + - cell + - component + - controller + - fixture + - form + - helper + - mailer + - migration + - migration_snapshot + - model + - plugin + - shell + - shell-helper + - template + - test + + By using 'cake bake [name]' you can invoke a specific bake task. + +Puede obtener más información sobre lo que realiza cada una de las actividades +y sus opciones usando el parametro '--help' option:: + + $ bin/cake bake controller --help + + Welcome to CakePHP v3.1.6 Console + --------------------------------------------------------------- + App : src + Path: /var/www/cakephp.dev/src/ + --------------------------------------------------------------- + Bake a controller skeleton. + + Usage: + cake bake controller [subcommand] [options] [] + + Subcommands: + + all Bake all controllers with CRUD methods. + + To see help on a subcommand use `cake bake controller [subcommand] --help` + + Options: + + --help, -h Display this help. + --verbose, -v Enable verbose output. + --quiet, -q Enable quiet output. + --plugin, -p Plugin to bake into. + --force, -f Force overwriting existing files without prompting. + --connection, -c The datasource connection to get data from. + (default: default) + --theme, -t The theme to use when baking code. + --components The comma separated list of components to use. + --helpers The comma separated list of helpers to use. + --prefix The namespace/routing prefix to use. + --no-test Do not generate a test skeleton. + --no-actions Do not generate basic CRUD action methods. + + Arguments: + + name Name of the controller to bake. Can use Plugin.name to bake + controllers into plugins. (optional) + +Temas Bake / Templates +====================== + +La opción ``theme`` es genérica para todos los comandos bake y permite cambiar los +templates de bake utilizados para generar los archivos finales. Para crear sus +propios templates, ver :ref:`bake theme creation documentation +`. + +.. meta:: + :title lang=es: Crear código con Bake + :keywords lang=es: interfaz de línea de comando, aplicación funcional, base de datos, configuración de base de datos, bash script, ingredientes básicos, proyecto, modelo, path, crear código, generación de código, scaffolding, usuarios windows, archivo de configuración, pocos minutos, configurar, iew, shell, modelos, running, mysql diff --git a/app/vendor/cakephp/bake/docs/fr/conf.py b/app/vendor/cakephp/bake/docs/fr/conf.py new file mode 100644 index 000000000..b02032efa --- /dev/null +++ b/app/vendor/cakephp/bake/docs/fr/conf.py @@ -0,0 +1,9 @@ +import sys, os + +# Append the top level directory of the docs, so we can import from the config dir. +sys.path.insert(0, os.path.abspath('..')) + +# Pull in all the configuration options defined in the global config file.. +from config.all import * + +language = 'fr' diff --git a/app/vendor/cakephp/bake/docs/fr/contents.rst b/app/vendor/cakephp/bake/docs/fr/contents.rst new file mode 100644 index 000000000..08c3e957c --- /dev/null +++ b/app/vendor/cakephp/bake/docs/fr/contents.rst @@ -0,0 +1,7 @@ +.. toctree:: + :maxdepth: 2 + :caption: CakePHP Bake + + /index + /usage + /development diff --git a/app/vendor/cakephp/bake/docs/fr/development.rst b/app/vendor/cakephp/bake/docs/fr/development.rst new file mode 100644 index 000000000..61de705da --- /dev/null +++ b/app/vendor/cakephp/bake/docs/fr/development.rst @@ -0,0 +1,351 @@ +Etendre Bake +############ + +Bake dispose d'une architecture extensible qui permet à votre application ou +à vos plugins de modifier ou ajouter la fonctionnalité de base. Bake utilise une +classe de vue dédiée qui n'utilise pas la syntaxe PHP standard. + +Events de Bake +============== + +Comme une classe de vue, ``BakeView`` envoie les mêmes events que toute autre +classe de vue, ainsi qu'un event initialize supplémentaire. Cependant, +alors que les classes de vue standard utilisent le préfixe d'event +"View.", ``BakeView`` utilise le préfixe d'event "Bake.". + +L'event initialize peut être utilisé pour faire des changements qui +s'appliquent à toutes les sorties fabriquées avec bake, par exemple pour ajouter +un autre helper à la classe de vue bake, cet event peut être utilisé:: + + on('Bake.initialize', function (Event $event) { + $view = $event->getSubject(); + + // Dans mes templates de bake, permet l'utilisation du helper MySpecial + $view->loadHelper('MySpecial', ['some' => 'config']); + + // Et ajoute une variable $author pour qu'elle soit toujours disponible + $view->set('author', 'Andy'); + + }); + +Si vous souhaitez modifier bake à partir d'un autre plugin, mettre les events +de bake de votre plugin dans le fichier ``config/bootstrap.php`` du plugin est +une bonne idée. + +Les events de bake peuvent être pratiques pour faire de petits changements dans +les templates existants. Par exemple, pour changer les noms de variables +utilisés lors de la création avec bake de fichiers de controller/template, on +pourra utiliser une fonction qui écoute ``Bake.beforeRender`` pour modifier les +variables utilisées dans les templates de bake:: + + on('Bake.beforeRender', function (Event $event) { + $view = $event->getSubject(); + + // Utilise $rows pour les principales variables de données dans les indexes + if ($view->get('pluralName')) { + $view->set('pluralName', 'rows'); + } + if ($view->get('pluralVar')) { + $view->set('pluralVar', 'rows'); + } + + // Utilise $theOne pour les principales variable de données dans les view/edit + if ($view->get('singularName')) { + $view->set('singularName', 'theOne'); + } + if ($view->get('singularVar')) { + $view->set('singularVar', 'theOne'); + } + + }); + +Vous pouvez aussi scoper les events ``Bake.beforeRender`` et +``Bake.afterRender`` dans un fichier généré spécifique. Par exemple, si vous +souhaitez ajouter des actions spécifiques à votre UsersController quand vous le +générez à partir d'un fichier **Controller/controller.ctp**, vous pouvez +utiliser l'event suivant:: + + on( + 'Bake.beforeRender.Controller.controller', + function (Event $event) { + $view = $event->subject; + if ($view->viewVars['name'] == 'Users') { + // ajouter les actions login et logout au controller Users + $view->viewVars['actions'] = [ + 'login', + 'logout', + 'index', + 'view', + 'add', + 'edit', + 'delete' + ]; + } + } + ); + +En scopant les écouteurs d'event vers des templates de bake spécifiques, vous +pouvez simplifier votre logique d'event liée à bake et fournir des callbacks +qui sont plus faciles à tester. + +Syntaxe de Template de Bake +=========================== + +Les fichiers de template de Bake utilisent les balises erb-style (``<% %>``) +pour indiquer la logique des templates, et traitent le reste, y compris les +balises php, comme du texte. + +.. note:: + + Les fichiers de template de Bake n'utilisent pas, et sont insensibles aux + ``asp_tags`` de la configuration de php ini. + +``BakeView`` intègre les balises suivantes: + + * ``<%`` Une balise php ouverte de template de Bake + * ``%>`` Une balise php fermante de template de Bake + * ``<%=`` Une balise php de short-echo de template de Bake + * ``<%-`` Une balise php ouverte de template de Bake, enlevant tout espace + en tête avant la balise + * ``-%>`` Une balise php fermante de template de Bake, enlevant les espaces + à a fin après la balise + +Une façon de voir/comprendre la façon dont les templates de Bake fonctionne, +spécialement quand on essaie de modifier les fichiers de template de bake, est +de créer avec bake une classe et de comparer le template utilisé avec le +template déjà présent dans le dossier **tmp/bake** de votre application. + +Ainsi, par exemple, pour créer avec bake un shell comme ceci: + +.. code-block:: bash + + bin/cake bake shell Foo + +Le template utilisé +(**vendor/cakephp/cakephp/src/Template/Bake/Shell/shell.ctp**) +ressemble à ceci:: + + \Shell; + + use Cake\Console\Shell; + + /** + * <%= $name %> shell command. + */ + class <%= $name %>Shell extends Shell + { + + /** + * main() method. + * + * @return bool|int Success or error code. + */ + public function main() + { + } + + } + +Le fichier template déjà présent (pre-processed) +(**tmp/bake/Bake-Shell-shell-ctp.php**), qui est le fichier réellement +rendu, ressemble à ceci:: + + \Shell; + + use Cake\Console\Shell; + + /** + * shell command. + */ + class Shell extends Shell + { + + /** + * main() method. + * + * @return bool|int Success or error code. + */ + public function main() + { + } + + } + +Et la classe résultante construite avec bake (**src/Shell/FooShell.php**) +ressemble à ceci:: + + \Foo; + + /** + * <%= $name %> foo + */ + class <%= $name %>Foo + { + // Add code. + } + +Vous devriez maintenant voir votre nouvelle tâche dans l'affichage de +``bin/cake bake``. Vous pouvez lancer votre nouvelle tâche en exécutant +``bin/cake bake foo Example``. +Cela va générer une nouvelle classe ``ExampleFoo`` dans +**src/Foo/ExampleFoo.php** que votre application va +pouvoir utiliser. + +Si vous souhaitez que votre appel à ``bake`` crée également un fichier de test +pour la classe ``ExampleFoo``, vous devrez surcharger la méthode ``bakeTest()`` +dans la classe ``FooTask`` pour y définir le suffixe et le namespace de la +classe de votre nom de commande personnalisée:: + + public function bakeTest($className) + { + if (!isset($this->Test->classSuffixes[$this->name()])) { + $this->Test->classSuffixes[$this->name()] = 'Foo'; + } + + $name = ucfirst($this->name()); + if (!isset($this->Test->classTypes[$name])) { + $this->Test->classTypes[$name] = 'Foo'; + } + + return parent::bakeTest($className); + } + +* Le **suffixe de classe** sera ajouté après le nom passé à ``bake``. Dans le + cadre de l'exemple ci-dessus, cela créerait un fichier ``ExampleFooTest.php``. +* Le **type de classe** sera le sous-namespace utilisé pour atteindre votre + fichier (relatif à l'application ou au plugin dans lequel vous faites le + ``bake``). Dans le cadre de l'exemple ci-dessus, cela créerait le test avec le + namespace ``App\Test\TestCase\Foo``. + +.. meta:: + :title lang=fr: Etendre Bake + :keywords lang=fr: interface ligne de commande,development,bake view, bake template syntax,erb tags,asp tags,percent tags diff --git a/app/vendor/cakephp/bake/docs/fr/index.rst b/app/vendor/cakephp/bake/docs/fr/index.rst new file mode 100644 index 000000000..c086cac49 --- /dev/null +++ b/app/vendor/cakephp/bake/docs/fr/index.rst @@ -0,0 +1,26 @@ +Console Bake +############ + +La console Bake de CakePHP est un autre outil permettant de réaliser son +application rapidement. La console Bake peut créer chacun des ingrédients +basiques de CakePHP : models, behaviors, views, helpers, controllers, +components, cas de tests, fixtures et plugins. Et nous ne parlons pas +seulement des squelettes de classes : Bake peut créer une application +fonctionnelle complète en seulement quelques minutes. En réalité, Bake est une +étape naturelle à suivre une fois qu'une application a été prototypée. + +Installation +============ + +Avant d'essayer d'utiliser ou d'étendre bake, assurez-vous qu'il est installé +dans votre application. Bake est disponible en tant que plugin que vous pouvez +installer avec Composer:: + + composer require --dev cakephp/bake:~1.0 + +Ceci va installer bake en tant que dépendance de développement. Cela signifie +qu'il ne sera pas installé lors d'un déploiement en production. + +.. meta:: + :title lang=fr: Console Bake + :keywords lang=fr: interface ligne de commande,development,bake view, bake template syntaxe,erb tags,asp tags,percent tags diff --git a/app/vendor/cakephp/bake/docs/fr/usage.rst b/app/vendor/cakephp/bake/docs/fr/usage.rst new file mode 100644 index 000000000..56e891a19 --- /dev/null +++ b/app/vendor/cakephp/bake/docs/fr/usage.rst @@ -0,0 +1,108 @@ +Génération de Code avec Bake +############################ + +Suivant la configuration de votre installation, vous devrez peut être donner +les droits d'exécution au script bash cake ou l'appeler avec la commande +``./bin/cake bake``. +La console cake est exécutée en utilisant le CLI PHP +(Interface de Ligne de Commande). Si vous avez des problèmes en exécutant ce +script, vérifiez que : + +#. le CLI PHP est installé et qu'il a les bons modules activés (ex: MySQL, intl). +#. Certains utilisateurs peuvent aussi rencontrer des problèmes si la base de + données host est 'localhost' et devront essayer '127.0.0.1' à la place. +#. Selon la configuration de votre ordinateur, vous devrez peut-être permettre + l'exécution du script bash pour permettre de lancer ``bin/cake bake``. + +Avant de lancer bake, vous devrez vous assurer qu'au moins une connection à une +base de données est configurée. + +Si vous exécutez la commande sans argument, ``bin/cake bake`` affichera la liste +des tâches disponibles. Vous devriez voir quelque chose comme ceci:: + + $ bin/cake bake + + Welcome to CakePHP v3.x.x Console + --------------------------------------------------------------- + App : src + Path: /var/www/cakephp.dev/src/ + --------------------------------------------------------------- + Les commandes suivantes avec lesquelles vous pouvez générer un squelette de + code pour votre application. + + Les commandes disponibles de bake: + + - all + - behavior + - cell + - component + - controller + - fixture + - form + - helper + - mailer + - migration + - migration_snapshot + - model + - plugin + - shell + - shell-helper + - template + - test + + En utilisant `cake bake [name]` vous pouvez faire appel à une tâche + spécifique de bake. + +Vous pouvez obtenir plus d'informations sur ce que chaque tâche fait et les +options disponibles en utilisant l'option ``--help``:: + + $ bin/cake bake controller --help + + Welcome to CakePHP v3.x.x Console + --------------------------------------------------------------- + App : src + Path: /var/www/cakephp.dev/src/ + --------------------------------------------------------------- + Bake a controller skeleton. + + Usage: + cake bake controller [subcommand] [options] [] + + Subcommands: + + all Bake all controllers with CRUD methods. + + To see help on a subcommand use `cake bake controller [subcommand] --help` + + Options: + + --help, -h Display this help. + --verbose, -v Enable verbose output. + --quiet, -q Enable quiet output. + --plugin, -p Plugin to bake into. + --force, -f Force overwriting existing files without prompting. + --connection, -c The datasource connection to get data from. + (default: default) + --theme, -t The theme to use when baking code. + --components The comma separated list of components to use. + --helpers The comma separated list of helpers to use. + --prefix The namespace/routing prefix to use. + --no-test Do not generate a test skeleton. + --no-actions Do not generate basic CRUD action methods. + + Arguments: + + name Name of the controller to bake. Can use Plugin.name to bake + controllers into plugins. (optional) + +Themes de Bake +============== + +L'option theme est commune à toutes les commandes de bake, et permet de changer +les fichiers de template utilisés lors de la création avec bake. Pour créer vos +propres templates, référez-vous :ref:`à la documentation sur la création de +theme bake `. + +.. meta:: + :title lang=fr: Génération de Code avec Bake + :keywords lang=fr: interface ligne de commande,application fonctionnelle,base de données,configuration base de données,bash script,ingredients basiques,project,model,path path,génération de code,scaffolding,windows users,configuration file,few minutes,config,iew,shell,models,running,mysql diff --git a/app/vendor/cakephp/bake/docs/ja/conf.py b/app/vendor/cakephp/bake/docs/ja/conf.py new file mode 100644 index 000000000..5871da648 --- /dev/null +++ b/app/vendor/cakephp/bake/docs/ja/conf.py @@ -0,0 +1,9 @@ +import sys, os + +# Append the top level directory of the docs, so we can import from the config dir. +sys.path.insert(0, os.path.abspath('..')) + +# Pull in all the configuration options defined in the global config file.. +from config.all import * + +language = 'ja' diff --git a/app/vendor/cakephp/bake/docs/ja/contents.rst b/app/vendor/cakephp/bake/docs/ja/contents.rst new file mode 100644 index 000000000..08c3e957c --- /dev/null +++ b/app/vendor/cakephp/bake/docs/ja/contents.rst @@ -0,0 +1,7 @@ +.. toctree:: + :maxdepth: 2 + :caption: CakePHP Bake + + /index + /usage + /development diff --git a/app/vendor/cakephp/bake/docs/ja/development.rst b/app/vendor/cakephp/bake/docs/ja/development.rst new file mode 100644 index 000000000..75ffc5436 --- /dev/null +++ b/app/vendor/cakephp/bake/docs/ja/development.rst @@ -0,0 +1,301 @@ +Bake の拡張 +########### + +Bake は、アプリケーションやプラグインが基本機能に対して変更または追加を可能にする +拡張可能なアーキテクチャーを備えています。Bake は、 `Twig `_ +テンプレートエンジンを使用したビュークラスを利用します。 + +Bake イベント +============= + +``BakeView`` は、ビュークラスとして、他のビュークラスと同様のイベントに加え、 +1つの特別な初期化 (initialize) イベントを発します。しかし、一方で標準ビュークラスは、 +イベントのプレフィックス "View." を使用しますが、 ``BakeView`` は、 +イベントのプレフィックス "Bake." を使用しています。 + +初期化イベントは、すべての bake の出力に対して変更を加えるために使用できます。 +例えば、bake ビュークラスに他のヘルパーを追加するためにこのイベントは使用されます。 :: + + on('Bake.initialize', function (Event $event) { + $view = $event->getSubject(); + + // bake テンプレートの中で MySpecial ヘルパーの使用を可能にします + $view->loadHelper('MySpecial', ['some' => 'config']); + + // そして、$author 変数を利用可能にするために追加 + $view->set('author', 'Andy'); + + }); + +別のプラグインの中から bake を変更したい場合は、プラグインの ``config/bootstrap.php`` +ファイルでプラグインの Bake イベントを置くことは良いアイデアです。 + +Bake イベントは、既存のテンプレートに小さな変更を行うための便利なことができます。 +例えば、コントローラーやテンプレートファイルを bake する際に使用される変数名を +変更するために、bake テンプレートで使用される変数を変更するために +``Bake.beforeRender`` で呼び出される関数を使用することができます。 :: + + on('Bake.beforeRender', function (Event $event) { + $view = $event->getSubject(); + + // indexes の中のメインデータ変数に $rows を使用 + if ($view->get('pluralName')) { + $view->set('pluralName', 'rows'); + } + if ($view->get('pluralVar')) { + $view->set('pluralVar', 'rows'); + } + + // view と edit の中のメインデータ変数に $theOne を使用 + if ($view->get('singularName')) { + $view->set('singularName', 'theOne'); + } + if ($view->get('singularVar')) { + $view->set('singularVar', 'theOne'); + } + + }); + +特定の生成されたファイルへの ``Bake.beforeRender`` と ``Bake.afterRender`` +イベントを指定することもあるでしょう。例えば、 +**Controller/controller.twig** ファイルから生成する際、 UsersController +に特定のアクションを追加したい場合、以下のイベントを使用することができます。 :: + + on( + 'Bake.beforeRender.Controller.controller', + function (Event $event) { + $view = $event->getSubject(); + if ($view->viewVars['name'] == 'Users') { + // Users コントローラーに login と logout を追加 + $view->viewVars['actions'] = [ + 'login', + 'logout', + 'index', + 'view', + 'add', + 'edit', + 'delete' + ]; + } + } + ); + +特定の bake テンプレートのためのイベントリスナーを指定することによって、 +bake 関連のイベント・ロジックを簡素化し、テストするのが容易であるコールバックを +提供することができます。 + +Bake テンプレート構文 +===================== + +Bake テンプレートファイルは、 `Twig `__ +テンプレート構文を使用します。 + +bake テンプレートがどのように動作するかを確認/理解する一つの方法は、 +bake テンプレートファイルを変更しようとする場合は特に、クラスを bake して、 +アプリケーションの **tmp/bake** フォルダー内に残っている前処理されたテンプレートファイルを +使ったテンプレートと比較することです。 + +だから、例えば、以下のようにシェルを bake した場合: + +.. code-block:: bash + + bin/cake bake shell Foo + +(**vendor/cakephp/bake/src/Template/Bake/Shell/shell.twig**) を使用した +テンプレートは、以下のようになります。 :: + + `` Bake テンプレートの PHP 終了タグ + * ``<%=`` Bake テンプレートの PHP ショートエコータグ + * ``<%-`` Bake テンプレートの PHP 開始タグ、タグの前に、先頭の空白を除去 + * ``-%>`` Bake テンプレートの PHP 終了タグ、タグの後に末尾の空白を除去 + +.. _creating-a-bake-theme: + +Bake テーマの作成 +================= + +"bake" コマンドによって生成された出力を変更したい場合、bake が使用するテンプレートの +一部または全部を置き換えることができる、独自の bake の「テーマ」を作成することができます。 +これを行うための最善の方法は、次のとおりです。 + +#. 新しいプラグインを bake します。プラグインの名前は bake の「テーマ」名になります。 +#. 新しいディレクトリー **plugins/[name]/src/Template/Bake/Template/** を作成します。 +#. **vendor/cakephp/bake/src/Template/Bake/Template** から上書きしたい + テンプレートをあなたのプラグインの中の適切なファイルにコピーしてください。 +#. bake を実行するときに、必要であれば、 bake のテーマを指定するための ``--theme`` + オプションを使用してください。各呼び出しでこのオプションを指定しなくても済むように、 + カスタムテーマをデフォルトテーマとして使用するように設定することもできます。 :: + + Test->classSuffixes[$this->name()])) { + $this->Test->classSuffixes[$this->name()] = 'Foo'; + } + + $name = ucfirst($this->name()); + if (!isset($this->Test->classTypes[$name])) { + $this->Test->classTypes[$name] = 'Foo'; + } + + return parent::bakeTest($className); + } + +* **class suffix** は ``bake`` 呼び出しで与えられた名前に追加します。前の例では、 + ``ExampleFooTest.php`` ファイルを作成します。 +* **class type** は、(あなたが bake するアプリやプラグインに関連する) + あなたのファイルを導くために使用されるサブ名前空間です。 + 前の例では、名前空間 ``App\Test\TestCase\Foo`` でテストを作成します。 + +.. meta:: + :title lang=ja: Bake の拡張 + :keywords lang=ja: command line interface,development,bake view, bake template syntax,twig,erb tags,percent tags diff --git a/app/vendor/cakephp/bake/docs/ja/index.rst b/app/vendor/cakephp/bake/docs/ja/index.rst new file mode 100644 index 000000000..a37f45b36 --- /dev/null +++ b/app/vendor/cakephp/bake/docs/ja/index.rst @@ -0,0 +1,28 @@ +Bake コンソール +################ + +CakePHP の bake コンソールは、迅速に CakePHP を動作させるまでを支援します。 +bake コンソールは、CakePHP の基本的な素材(モデル、ビヘイビアー、ビュー、ヘルパー、 +コントローラー、コンポーネント、テストケース、フィクスチャー、プラグイン)を作成できます。 +その為のスケルトンクラスについては、ここでは省略しますが、 +bake は数分で完全に機能するアプリケーションを作成できます。 +要するに、bake は足場の組まれたアプリケーションをいっぺんに手に入れるためにうってつけの方法です。 + +インストール手順 +================= + +bake を使用したり拡張する前に、アプリケーションに bake をインストールしておいてください。 +bake は Composer を使ってインストールするプラグインとして提供されています。 :: + + composer require --dev cakephp/bake:~1.0 + +上記のコマンドは、bake を開発環境で使用するパッケージとしてインストールします。 +この入れ方の場合、本番環境としてデプロイする際には、 bake はインストールされません。 + +Twig テンプレートを使用する場合、 ``WyriHaximus/TwigView`` プラグインをブートストラップとともに +読み込んでいることを確認してください。それを完全に省略して、 +Bake プラグインにこのプラグインを読み込ませることもできます。 + +.. meta:: + :title lang=ja: Bakeコンソール + :keywords lang=ja: コマンドライン,CLI,development,bake view, bake template syntax,erb tags,asp tags,percent tags diff --git a/app/vendor/cakephp/bake/docs/ja/usage.rst b/app/vendor/cakephp/bake/docs/ja/usage.rst new file mode 100644 index 000000000..d9470e6c3 --- /dev/null +++ b/app/vendor/cakephp/bake/docs/ja/usage.rst @@ -0,0 +1,102 @@ +Bake でコード生成 +################## + +cake コンソールは、 PHP CLI (command line interface) で実行します。 +もしスクリプトの実行に問題があるなら、以下を満たしてください。 + +#. PHP CLI がインストールされているか適切なモジュールが有効か確認してください (例:MySQL, intl)。 +#. データベースのホストが 'localhost' で問題があるなら、代わりに '127.0.0.1' を使って下さい。 + PHP CLI でこの問題がおこる可能性があります。 +#. 使っているコンピューターの設定に応じて、 ``bin/cake bake`` で使用する cake bash スクリプトの + 実行権限を設定する必要があります。 + +bake を実行する前にデータベースとの接続を確認しましょう。 + +``bin/cake bake`` を引数無しで実行すると可能なタスクを表示できます。 + +Windows システムの場合、 ``bin\cake bake`` を試してみてください。 + +それは以下のように表示されます。 :: + + $ bin/cake bake + + Welcome to CakePHP v3.1.6 Console + --------------------------------------------------------------- + App : src + Path: /var/www/cakephp.dev/src/ + PHP: 5.5.8 + --------------------------------------------------------------- + The following commands can be used to generate skeleton code for your application. + + Available bake commands: + + - all + - behavior + - cell + - component + - controller + - fixture + - form + - helper + - mailer + - migration + - migration_snapshot + - model + - plugin + - shell + - shell-helper + - template + - test + + By using `cake bake [name]` you can invoke a specific bake task. + +より詳しい各コマンドの情報を得るには、 ``--help`` オプションをつけ実行してください。 :: + + $ bin/cake bake controller --help + + Welcome to CakePHP v3.1.6 Console + --------------------------------------------------------------- + App : src + Path: /var/www/cakephp.dev/src/ + --------------------------------------------------------------- + Bake a controller skeleton. + + Usage: + cake bake controller [subcommand] [options] [] + + Subcommands: + + all Bake all controllers with CRUD methods. + + To see help on a subcommand use `cake bake controller [subcommand] --help` + + Options: + + --help, -h Display this help. + --verbose, -v Enable verbose output. + --quiet, -q Enable quiet output. + --plugin, -p Plugin to bake into. + --force, -f Force overwriting existing files without prompting. + --connection, -c The datasource connection to get data from. + (default: default) + --theme, -t The theme to use when baking code. + --components The comma separated list of components to use. + --helpers The comma separated list of helpers to use. + --prefix The namespace/routing prefix to use. + --no-test Do not generate a test skeleton. + --no-actions Do not generate basic CRUD action methods. + + Arguments: + + name Name of the controller to bake. Can use Plugin.name to bake + controllers into plugins. (optional) + +Bake テーマオプション +===================== + +テーマオプションは全 bake コマンドで一般的です。また、bake テンプレートファイルを変更することができます。 +テーマを作るには、 :ref:`Bake テーマ作成ドキュメント ` をご覧ください。 + +.. meta:: + :title lang=ja: Code Generation with Bake + :keywords lang=ja: command line interface,functional application,database,database configuration,bash script,basic ingredients,project,model,path path,code generation,scaffolding,windows users,configuration file,few minutes,config,iew,shell,models,running,mysql diff --git a/app/vendor/cakephp/bake/docs/pt/conf.py b/app/vendor/cakephp/bake/docs/pt/conf.py new file mode 100644 index 000000000..9e22cb017 --- /dev/null +++ b/app/vendor/cakephp/bake/docs/pt/conf.py @@ -0,0 +1,9 @@ +import sys, os + +# Append the top level directory of the docs, so we can import from the config dir. +sys.path.insert(0, os.path.abspath('..')) + +# Pull in all the configuration options defined in the global config file.. +from config.all import * + +language = 'pt' diff --git a/app/vendor/cakephp/bake/docs/pt/contents.rst b/app/vendor/cakephp/bake/docs/pt/contents.rst new file mode 100644 index 000000000..08c3e957c --- /dev/null +++ b/app/vendor/cakephp/bake/docs/pt/contents.rst @@ -0,0 +1,7 @@ +.. toctree:: + :maxdepth: 2 + :caption: CakePHP Bake + + /index + /usage + /development diff --git a/app/vendor/cakephp/bake/docs/pt/development.rst b/app/vendor/cakephp/bake/docs/pt/development.rst new file mode 100644 index 000000000..eeab55e00 --- /dev/null +++ b/app/vendor/cakephp/bake/docs/pt/development.rst @@ -0,0 +1,280 @@ +Extendendo o Bake +################# + +Bake fornece uma extenssiva arquitetura que permite a sua aplicação ou plugin ser modificado ou adicionar funcionalidades as bases. Bake faz uso de uma classe view dedicada que usa o `Twig `_ engine de templates. + +Eventos do Bake +=============== + +Como uma class view , ``BakeView`` emite o mesmo evento como qualquer outra classe view, +mais uma extra que inicializa eventos. No entanto, onde classe view padrão usa o prefixo "View.", ``BakeView`` usa o prefixo "Bake.". + +O inicializador de eventos pode ser usado para fazer mudanças quando aplicadoa toda a saida do bake +, por exemplo ao adicionar outro helper ao bake view class este evebti oide ser usado:: + + on('Bake.initialize', function (Event $event) { + $view = $event->getSubject(); + + // No meu bake de templates, permite uso de MuSpecial helper + $view->loadHelper('MySpecial', ['some' => 'config']); + + // E adicionar uma variável $author então este estará sempre disponível + $view->set('author', 'Andy'); + + }); + +Se você quer modificar o seu bake apartir de outro pugin, coloque o bake do seu plugin dentro do arquivo do seu próprio plugin ``config/bootstrap.php`` será uma boa ideia. + +Os eventos do Bake podem ser úteis para fazer pequenas alterações nos modelos existentes. +Por exemplo, para alterar os nomes das variáveis usados quando o controlador / modelo de baking +arquivos podem usar uma função ouvindo ``Bake.beforeRender`` para modificar as variaveis usadas no bake templates:: + + on('Bake.beforeRender', function (Event $event) { + $view = $event->getSubject(); + + // Use $ rows para a variável de dados principal em índices + if ($view->get('pluralName')) { + $view->set('pluralName', 'rows'); + } + if ($view->get('pluralVar')) { + $view->set('pluralVar', 'rows'); + } + + // Use $ theOne para a variável de dados principal em exibição / edição + if ($view->get('singularName')) { + $view->set('singularName', 'theOne'); + } + if ($view->get('singularVar')) { + $view->set('singularVar', 'theOne'); + } + + }); + +Você também pode abranger o ``Bake.beforeRender`` e ``Bake.afterRender`` eventos para um arquivo gerado específico. Por exemplo, se você quiser adicionar ações específicas para seu UsersController ao gerar a partir de um arquivo **Controller/controller.twig**, +você pode usar o seguinte evento:: + + on( + 'Bake.beforeRender.Controller.controller', + function (Event $event) { + $view = $event->getSubject(); + if ($view->viewVars['name'] == 'Users') { + // adicionar ações de login e logout ao Users controller + $view->viewVars['actions'] = [ + 'login', + 'logout', + 'index', + 'view', + 'add', + 'edit', + 'delete' + ]; + } + } + ); + +Ao adicionar eventos que escutam o seu bake de templates, você pode simplesmente relacionar a sua logica de eventos com o bake e fornecer callbacks que são facilmente testáveis. + +Sintaxe de Templates do Bake +============================ + +Bake arquivos de template usa a sintaxe `Twig `__ de templates . + +Uma forma de ver/entender como o bake de templates funciona, especialmente quando tentamos modificar os arquivos de templates, é executar o bake de uma classe que compara o template usado com o template pré processado deixado anteriormente pela aplicação + +**tmp/bake** folder. + +Então, por exemplo, quando baking a shell é como? + +.. code-block:: bash + + bin/cake bake shell Foo + +O template usado (**vendor/cakephp/bake/src/Template/Bake/Shell/shell.twig**) +parece com algo assim:: + + `` Um template bake php fecha a tag + * ``<%=`` Um template bake php short-echo tag + * ``<%-`` Um template bake php abre a tag, revirando qualquer espaço em branco antes da tag + * ``-%>`` Um template bake php fecha a tag, revirando qualqualquer espaço em branco após a tag + +.. _creating-a-bake-theme: + +Criando um Tema Bake +===================== + +Se você deseja modificar a saída produzida com o comando bake, você pode criar o seu próprio tema para o bake, aos quais permitirá a você subsituir algum ou todos os tempaltes que o bake usa. o mmelhor jeito de fazer isto é: + +#. Bake um novo plugin. O nome do plugin é o bake 'nome do tema' +#. Crie uma nova pasta em **plugins/[name]/src/Template/Bake/Template/**. +#. Copie qualquer template que você queira para sobrescrer de + **vendor/cakephp/bake/src/Template/Bake/Template** que feche com os arquivos no seu plugin. +#. Quando executando o bake use a opção ``--theme`` para especificar qual o tema que o bake deve usar + . Para evitar problemas com esta opção, em cada chamada, você tambem pode definir o seu template customizado para ser usado como o template padrão:: + + Test->classSuffixes[$this->name()])) { + $this->Test->classSuffixes[$this->name()] = 'Foo'; + } + + $name = ucfirst($this->name()); + if (!isset($this->Test->classTypes[$name])) { + $this->Test->classTypes[$name] = 'Foo'; + } + + return parent::bakeTest($className); + } + +* A **class suffix** vai se indexado ao mesmo nome providenciado por você na sua chamada de ``bake`` + . No exemplo anterior, isto criaria o arquivo ``ExampleFooTest.php`` . +* O **class type** vai ser o sub namespace usado para o seu arquivo (relativo ao aplicativo ou plugin que vocês está baking). No exemplo anterior, isto poderia criar o seu teste com o namespace ``App\Test\TestCase\Foo`` + +.. meta:: + :title lang=en: Extending Bake + :keywords lang=en: command line interface,development,bake view, bake template syntax,twig,erb tags,percent tags + diff --git a/app/vendor/cakephp/bake/docs/pt/index.rst b/app/vendor/cakephp/bake/docs/pt/index.rst new file mode 100644 index 000000000..f4ebdf005 --- /dev/null +++ b/app/vendor/cakephp/bake/docs/pt/index.rst @@ -0,0 +1,25 @@ +Bake Console +############ + +O bake console do CakePHP é outro empenho para você ter o CakePHP configurado +e funcionando rápido. O bake console pode criar qualquer ingrediente básico do +CakePHP: models, behaviors, views, helpers, components, test cases, fixtures e +plugins. E nós não estamos apenas falando de classes esqueleto: O Bake pode +criar uma aplicação totalmente funcional em questão de minutos. De fato, o Bake +é um passo natural a se dar uma vez que a aplicação tem seu alicerce construído. + +Instalação +========== + +Antes de tentar usar ou extender o bake, tenha certeza que ele está instalado em +sua aplicação. O bake é distribuído como um plugin que você pode instalar com o +Composer:: + + composer require --dev cakephp/bake:~1.0 + +Isto irá instalar o bake como uma dependência de desenvolvimento, sendo assim, +não instalado quando em um ambiente de produção. + +.. meta:: + :title lang=pt: Bake Console + :keywords lang=pt: cli,linha de comando,command line,dev,desenvolvimento,bake view, bake syntax,erb tags,asp tags,percent tags diff --git a/app/vendor/cakephp/bake/docs/pt/usage.rst b/app/vendor/cakephp/bake/docs/pt/usage.rst new file mode 100644 index 000000000..79d03231a --- /dev/null +++ b/app/vendor/cakephp/bake/docs/pt/usage.rst @@ -0,0 +1,130 @@ +Geração de código com bake +########################## + +O console do cake é executado usando a CLI do PHP (interface da linha de comando). +Se você tiver problemas para executar o script, assegure-se de que: + +#. Você instalou a CLI do PHP e possui os módulos apropriados habilitados (por + exemplo: MySQL, intl). +#. Os usuários também podem ter problemas se o host do banco de dados for + 'localhost' e deve tentar '127.0.0.1', em vez disso, como localhost pode + causar problemas com CLI PHP. +#. Dependendo de como o seu computador está configurado, você pode ter que + definir direitos de execução no script cake bash para chamá-lo usando + ``bin/cake bake``. + +Antes de executar o Bake você deve certificar-se de ter pelo menos um banco de dados +conexão configurada. + +Quando executado sem argumentos ``bin/cake bake`` irá exibir uma lista de +tarefas. Você deve ver algo como:: + + $ bin/cake bake + + Welcome to CakePHP v3.4.6 Console + --------------------------------------------------------------- + App : src + Path: /var/www/cakephp.dev/src/ + PHP : 5.6.20 + --------------------------------------------------------------- + The following commands can be used to generate skeleton code for your application. + + Available bake commands: + + - all + - behavior + - cell + - component + - controller + - fixture + - form + - helper + - mailer + - migration + - migration_diff + - migration_snapshot + - model + - plugin + - seed + - shell + - shell_helper + - task + - template + - test + + By using `cake bake [name]` you can invoke a specific bake task. + +Você pode obter mais informações sobre o que cada tarefa faz e quais são as opções +disponível usando o ``--help`` option:: + + $ bin/cake bake --help + + Welcome to CakePHP v3.4.6 Console + --------------------------------------------------------------- + App : src + Path: /var/www/cakephp.dev/src/ + PHP : 5.6.20 + --------------------------------------------------------------- + The Bake script generates controllers, models and template files for + your application. If run with no command line arguments, Bake guides the + user through the class creation process. You can customize the + generation process by telling Bake where different parts of your + application are using command line arguments. + + Usage: + cake bake.bake [subcommand] [options] + + Subcommands: + + all Bake a complete MVC skeleton. + behavior Bake a behavior class file. + cell Bake a cell class file. + component Bake a component class file. + controller Bake a controller skeleton. + fixture Generate fixtures for use with the test suite. You + can use `bake fixture all` to bake all fixtures. + form Bake a form class file. + helper Bake a helper class file. + mailer Bake a mailer class file. + migration Bake migration class. + migration_diff Bake migration class. + migration_snapshot Bake migration snapshot class. + model Bake table and entity classes. + plugin Create the directory structure, AppController class + and testing setup for a new plugin. Can create + plugins in any of your bootstrapped plugin paths. + seed Bake seed class. + shell Bake a shell class file. + shell_helper Bake a shell_helper class file. + task Bake a task class file. + template Bake views for a controller, using built-in or + custom templates. + test Bake test case skeletons for classes. + + To see help on a subcommand use `cake bake.bake [subcommand] --help` + + Options: + + --connection, -c Database connection to use in conjunction with `bake + all`. (default: default) + --everything Bake a complete MVC skeleton, using all the available + tables. Usage: "bake all --everything" + --force, -f Force overwriting existing files without prompting. + --help, -h Display this help. + --plugin, -p Plugin to bake into. + --prefix Prefix to bake controllers and templates into. + --quiet, -q Enable quiet output. + --tablePrefix Table prefix to be used in models. + --theme, -t The theme to use when baking code. (choices: + Bake|Migrations) + --verbose, -v Enable verbose output. + +Temas para o Bake +================= + +A opção de tema é comum a todos os comandos do bake, e permite mudar os arquivos de modelo usados no bake. Para criar seus próprios modelos, veja a +:ref:`documentação de criação de themes para o bake `. + +.. meta:: + :title lang=pt: Geração de código com bake + :keywords lang=pt: command line interface,functional application,database,database configuration,bash script,basic ingredients,project,model,path path,code generation,scaffolding,windows users,configuration file,few minutes,config,iew,shell,models,running,mysql diff --git a/app/vendor/cakephp/bake/docs/ru/conf.py b/app/vendor/cakephp/bake/docs/ru/conf.py new file mode 100644 index 000000000..f8a170ee5 --- /dev/null +++ b/app/vendor/cakephp/bake/docs/ru/conf.py @@ -0,0 +1,9 @@ +import sys, os + +# Append the top level directory of the docs, so we can import from the config dir. +sys.path.insert(0, os.path.abspath('..')) + +# Pull in all the configuration options defined in the global config file.. +from config.all import * + +language = 'ru' diff --git a/app/vendor/cakephp/bake/docs/ru/contents.rst b/app/vendor/cakephp/bake/docs/ru/contents.rst new file mode 100644 index 000000000..08c3e957c --- /dev/null +++ b/app/vendor/cakephp/bake/docs/ru/contents.rst @@ -0,0 +1,7 @@ +.. toctree:: + :maxdepth: 2 + :caption: CakePHP Bake + + /index + /usage + /development diff --git a/app/vendor/cakephp/bake/docs/ru/development.rst b/app/vendor/cakephp/bake/docs/ru/development.rst new file mode 100644 index 000000000..5b7de8ec8 --- /dev/null +++ b/app/vendor/cakephp/bake/docs/ru/development.rst @@ -0,0 +1,293 @@ +Расширение возможностей Bake +############################ + +Bake имеет расширяемую архитектуру, которая позволяет вашему приложению или плагинам +измененять или добавления его базовую функциональность. Bake использует специальный +класс, который использует механизм шаблонизатора `Twig `_. + +События Bake +============ + +В качестве класса представления ``BakeView`` генерирует те же события, что и любой другой класс представления, +плюс одно дополнительное событие инициализации. Однако, в то время как классы стандартного представления используют +префикс события "View.", ``BakeView`` использует префикс события "Bake.". + +Событие initialize можно использовать для внесения изменений, которые применяются ко всем 'испеченным' +выводам, например, чтобы добавить другого помощника в класс вида bake, это событие может +использовать следующее:: + + on('Bake.initialize', function (Event $event) { + $view = $event->getSubject(); + + // В моих шаблонах bake, разрешить использование MySpecial helper + $view->loadHelper('MySpecial', ['some' => 'config']); + + // И добавьте переменную $author, чтобы она всегда была доступна + $view->set('author', 'Andy'); + + }); + +Если вы хотите изменить выпечку из другого плагина, хорошей идеей будет - поместить +события своего плагина в файл ``config/bootstrap.php``. + +События Bake могут быть полезны для внесения небольших изменений в существующие шаблоны. +Например, чтобы изменить имена переменных, используемых для выпечки файлов контроллеров/шаблонов, +можно использовать прослушивающую функцию ``Bake.beforeRender``:: + + on('Bake.beforeRender', function (Event $event) { + $view = $event->getSubject(); + + // Использовать $rows для основной переменной данных для индекса (index) + if ($view->get('pluralName')) { + $view->set('pluralName', 'rows'); + } + if ($view->get('pluralVar')) { + $view->set('pluralVar', 'rows'); + } + + // Используйте $theOne для основной переменной данных для просмотра/редактирования (view/edit) + if ($view->get('singularName')) { + $view->set('singularName', 'theOne'); + } + if ($view->get('singularVar')) { + $view->set('singularVar', 'theOne'); + } + + }); + +Вы также можете использовать события ``Bake.beforeRender`` и ``Bake.afterRender`` для +генерирования специфичного файла. Например, если вы хотите добавить определенные действия для +вашего UserController при генерации из файла **Controller/controller.twig**, +вы можете использовать следующее событие:: + + on( + 'Bake.beforeRender.Controller.controller', + function (Event $event) { + $view = $event->getSubject(); + if ($view->viewVars['name'] == 'Users') { + // добавим действия входа и выхода из системы в контроллер пользователей + $view->viewVars['actions'] = [ + 'login', + 'logout', + 'index', + 'view', + 'add', + 'edit', + 'delete' + ]; + } + } + ); + +При просмотре прослушивателей событий для конкретных шаблонов выпечки вы можете упростить +выпечку связанной логики событий и обеспечить обратные вызовы, которые легче тестировать. + +Синтаксис шаблона выпечки +========================= + +Файлы шаблонов Bake используют синтаксис шаблонизатора `Twig `__. + +Один из способов увидеть/понять, как работают шаблоны выпечки, особенно при попытке +изменить файлы шаблонов выпечки, это - испечь класс и сравнить используемый шаблон +с предварительно обработанным файлом шаблона, который остаётся в приложении в папке +**tmp/bake**. + +Так, например, при выпечке такой оболочки: + +.. code-block:: bash + + bin/cake bake shell Foo + +Используемый шаблон (**vendor/cakephp/bake/src/Template/Bake/Shell/shell.twig**) +будет выглядеть так:: + + `` Bake шаблон закрывающего тега php + * ``<%=`` Bake шаблон php короткого php тега echo + * ``<%-`` Bake шаблон php открытия тега, удаляющего любые введённые пробелы перед тегом + * ``-%>`` Bake шаблон php закрытия тега, любые введённые пробелы после тега + +.. _creating-a-bake-theme: + +Создание темы Bake +================== + +Если вы хотите изменить результат, полученный командой "bake", вы можете +создать свою собственную тему('theme') для "bake", которая позволит вам заменить некоторые или все +шаблоны, которые испекает bake. Лучше всего сделать это так: + +#. Выпечь новый плагин. Имя плагина - это название темы 'bake' +#. Создать новую диреткорию **plugins/[name]/src/Template/Bake/Template/**. +#. Скопируйте любые шаблоны, которые вы хотите переопределить + **vendor/cakephp/bake/src/Template/Bake/Template** для сопоставления файлов с вашим плагином. +#. При запуске выпечки используйте параметр ``--theme``, чтобы указать тему выпечки которую вы + хотите использовать. Чтобы избежать необходимости указывать этот параметр в каждом вызове, вы также можете + настроить свою тему в качестве темы по умолчанию:: + + Test->classSuffixes[$this->name()])) { + $this->Test->classSuffixes[$this->name()] = 'Foo'; + } + + $name = ucfirst($this->name()); + if (!isset($this->Test->classTypes[$name])) { + $this->Test->classTypes[$name] = 'Foo'; + } + + return parent::bakeTest($className); + } + +* **Суффикс класса** будет добавлен к имени, указанному в вашем вызове ``bake``. + В предыдущем примере он создал бы файл ``ExampleFooTest.php``. + +* **Тип файла** будет использовать пространство под-пространство имён(sub-namespace), которое приведёт к файлу (относительно приложения или подключаемого модуля). В предыдущем примере, он создаст ваш тест с пространством имен ``App\Test\TestCase\Foo``. + +.. meta:: + :title lang=ru: Расширение возможностей Bake + :keywords lang=ru: интерфейс командной строки, разработка, выпечка, синтаксис шаблона выпечки, твинг, метки erb, процентные теги diff --git a/app/vendor/cakephp/bake/docs/ru/index.rst b/app/vendor/cakephp/bake/docs/ru/index.rst new file mode 100644 index 000000000..0b9c1bc80 --- /dev/null +++ b/app/vendor/cakephp/bake/docs/ru/index.rst @@ -0,0 +1,24 @@ +Консоль Bake +############ + +Bake консоль CakePHP - это еще один инструмент для быстрой разработки на фреймворке CakePHP. +Консоль Bake может создать любой из базовых компонентов или все сразу: models, +behaviors, views, helpers, controllers, components, test cases, fixtures и plugins. +Речь идет не только о каркасе приложения: Bake консоль создает полностью функционирующее приложение всего за пару минут. + +Bake это естественный шаг для статической генерации кода. + +Установка +========= + +Перед тем, как использовать Bake, убедитесь, что он установлен в вашем приложении. +Bake это отдельный плагин и вы можете установить его с помощью Composer:: + + composer require --dev cakephp/bake:~1.0 + +Команда выше установит Bake в зависимости от разработки. +Это значит, что Bake не будет установлен, когда вы делаете деплой на продакшн сервер. + +.. meta:: + :title lang=ru: Консоль Bake + :keywords lang=ru: интерфейс командной строки,разработка,bake view, bake template syntax,erb tags,asp tags,percent tags diff --git a/app/vendor/cakephp/bake/docs/ru/usage.rst b/app/vendor/cakephp/bake/docs/ru/usage.rst new file mode 100644 index 000000000..8cfd72b85 --- /dev/null +++ b/app/vendor/cakephp/bake/docs/ru/usage.rst @@ -0,0 +1,131 @@ +Генерация кода с помощью Bake +############################# + +Консоль cake запускается с использованием PHP CLI (интерфейса командной строки). +Если у вас возникли проблемы с запуском скрипта, убедитесь, что: + +#. У вас установлен PHP CLI и что у него есть соответствующие включённые модули + (например: MySQL, intl). +#. У пользователей также могут быть проблемы, если хост базы данных является + 'localhost' вмеcто этого можно попробовать '127.0.0.1', поскольку localhost + может вызвать проблемы с PHP CLI. +#. В зависимости от того, как настроен ваш компьютер, вам может потребоваться + установить права выполнения на скрипт bash, чтобы вызвать его, используя + ``bin/cake bake``. + +Перед запуском bake вы должны убедиться, что у вас есть хотя бы одна база данных и +соединение настроено. + +При запуске без аргументов ``bin/cake bake`` выводит список доступных +заданий. Вы должны увидеть что-то вроде:: + + $ bin/cake bake + + Welcome to CakePHP v3.4.6 Console + --------------------------------------------------------------- + App : src + Path: /var/www/cakephp.dev/src/ + PHP : 5.6.20 + --------------------------------------------------------------- + The following commands can be used to generate skeleton code for your application. + + Available bake commands: + + - all + - behavior + - cell + - component + - controller + - fixture + - form + - helper + - mailer + - migration + - migration_diff + - migration_snapshot + - model + - plugin + - seed + - shell + - shell_helper + - task + - template + - test + + By using `cake bake [name]` you can invoke a specific bake task. + +Вы можете получить больше дополнительной информации о том, что делает каждая задача, и какие параметры +доступны, если используете ключ ``--help``:: + + $ bin/cake bake --help + + Welcome to CakePHP v3.4.6 Console + --------------------------------------------------------------- + App : src + Path: /var/www/cakephp.dev/src/ + PHP : 5.6.20 + --------------------------------------------------------------- + The Bake script generates controllers, models and template files for + your application. If run with no command line arguments, Bake guides the + user through the class creation process. You can customize the + generation process by telling Bake where different parts of your + application are using command line arguments. + + Usage: + cake bake.bake [subcommand] [options] + + Subcommands: + + all Bake a complete MVC skeleton. + behavior Bake a behavior class file. + cell Bake a cell class file. + component Bake a component class file. + controller Bake a controller skeleton. + fixture Generate fixtures for use with the test suite. You + can use `bake fixture all` to bake all fixtures. + form Bake a form class file. + helper Bake a helper class file. + mailer Bake a mailer class file. + migration Bake migration class. + migration_diff Bake migration class. + migration_snapshot Bake migration snapshot class. + model Bake table and entity classes. + plugin Create the directory structure, AppController class + and testing setup for a new plugin. Can create + plugins in any of your bootstrapped plugin paths. + seed Bake seed class. + shell Bake a shell class file. + shell_helper Bake a shell_helper class file. + task Bake a task class file. + template Bake views for a controller, using built-in or + custom templates. + test Bake test case skeletons for classes. + + To see help on a subcommand use `cake bake.bake [subcommand] --help` + + Options: + + --connection, -c Database connection to use in conjunction with `bake + all`. (default: default) + --everything Bake a complete MVC skeleton, using all the available + tables. Usage: "bake all --everything" + --force, -f Force overwriting existing files without prompting. + --help, -h Display this help. + --plugin, -p Plugin to bake into. + --prefix Prefix to bake controllers and templates into. + --quiet, -q Enable quiet output. + --tablePrefix Table prefix to be used in models. + --theme, -t The theme to use when baking code. (choices: + Bake|Migrations) + --verbose, -v Enable verbose output. + +Темы Bake +========= + +Параметр темы является общим для всех команд bake, так же bake позволяет изменять +файлы шаблонов, используемые при 'выпечке'. Чтобы создать свои собственные шаблоны см. +:ref:`документация по созданию темы`. + +.. meta:: + :title lang=ru: Генерация кода с помощью Bake + :keywords lang=en: command line interface,functional application,database,database configuration,bash script,basic ingredients,project,model,path path,code generation,scaffolding,windows users,configuration file,few minutes,config,iew,shell,models,running,mysql diff --git a/app/vendor/cakephp/bake/phpcs.xml.dist b/app/vendor/cakephp/bake/phpcs.xml.dist new file mode 100644 index 000000000..9e40ece74 --- /dev/null +++ b/app/vendor/cakephp/bake/phpcs.xml.dist @@ -0,0 +1,11 @@ + + + + + + + + + 0 + + diff --git a/app/vendor/cakephp/bake/phpstan.neon b/app/vendor/cakephp/bake/phpstan.neon index e4f5c4fbf..68b9999e4 100644 --- a/app/vendor/cakephp/bake/phpstan.neon +++ b/app/vendor/cakephp/bake/phpstan.neon @@ -1,6 +1,7 @@ parameters: + level: 5 autoload_files: - tests/bootstrap.php ignoreErrors: - '#Call to an undefined method Cake\\Database\\Type::getDateTimeClassName\(\)#' - - '#Constant TESTS not found#' + - '#Parameter \#1 \$size of method .+CollectionInterface::take\(\) expects int, array given.#' diff --git a/app/vendor/cakephp/bake/src/Shell/BakeShell.php b/app/vendor/cakephp/bake/src/Shell/BakeShell.php index 3e42472ae..5e666d936 100644 --- a/app/vendor/cakephp/bake/src/Shell/BakeShell.php +++ b/app/vendor/cakephp/bake/src/Shell/BakeShell.php @@ -57,7 +57,7 @@ public function startup() Configure::write('debug', true); Cache::disable(); // Loading WyriHaximus/TwigView Plugin through the Plugin::load() for backward compatibility. - if (!Plugin::loaded('WyriHaximus/TwigView')) { + if (!Plugin::isLoaded('WyriHaximus/TwigView')) { Plugin::load('WyriHaximus/TwigView', ['bootstrap' => true]); } @@ -136,7 +136,7 @@ public function main() * - Shell/Task for each loaded plugin * - App/Shell/Task/ * - * @return void + * @return bool */ public function loadTasks() { @@ -153,7 +153,8 @@ public function loadTasks() $tasks = $this->_findTasks($tasks, APP, Configure::read('App.namespace')); $this->tasks = array_values($tasks); - parent::loadTasks(); + + return parent::loadTasks(); } /** @@ -239,6 +240,14 @@ protected function _findTaskClasses($files) */ public function all($name = null) { + if ( + $this->param('connection') && $this->param('everything') && + $this->param('connection') !== 'default' + ) { + $this->warn('Can only bake everything on default connection'); + + return false; + } $this->out('Bake All'); $this->hr(); @@ -301,10 +310,10 @@ public function getOptionParser() 'default' => false, 'boolean' => true, ])->addOption('prefix', [ - 'help' => 'Prefix to bake controllers and templates into.' + 'help' => 'Prefix to bake controllers and templates into.', ])->addOption('tablePrefix', [ 'help' => 'Table prefix to be used in models.', - 'default' => null + 'default' => null, ]); $parser = $this->_setCommonOptions($parser); @@ -314,7 +323,7 @@ public function getOptionParser() $this->{$task}->interactive = $this->interactive; $parser->addSubcommand(Inflector::underscore($task), [ 'help' => $taskParser->getDescription(), - 'parser' => $taskParser + 'parser' => $taskParser, ]); } diff --git a/app/vendor/cakephp/bake/src/Shell/Task/BakeTask.php b/app/vendor/cakephp/bake/src/Shell/Task/BakeTask.php index 57bfacdd4..83c7e2485 100644 --- a/app/vendor/cakephp/bake/src/Shell/Task/BakeTask.php +++ b/app/vendor/cakephp/bake/src/Shell/Task/BakeTask.php @@ -23,7 +23,6 @@ /** * Base class for Bake Tasks. - * */ class BakeTask extends Shell { @@ -126,7 +125,7 @@ public function getPath() * Base execute method parses some parameters and sets some properties on the bake tasks. * call when overriding execute() * - * @return void + * @return bool|int|null|void */ public function main() { @@ -156,7 +155,7 @@ public function callProcess($command) $descriptorSpec = [ 0 => ['pipe', 'r'], 1 => ['pipe', 'w'], - 2 => ['pipe', 'w'] + 2 => ['pipe', 'w'], ]; $this->_io->verbose('Running ' . $command); $process = proc_open( diff --git a/app/vendor/cakephp/bake/src/Shell/Task/BakeTemplateTask.php b/app/vendor/cakephp/bake/src/Shell/Task/BakeTemplateTask.php index b2e319e3c..a510fa001 100644 --- a/app/vendor/cakephp/bake/src/Shell/Task/BakeTemplateTask.php +++ b/app/vendor/cakephp/bake/src/Shell/Task/BakeTemplateTask.php @@ -36,7 +36,7 @@ class BakeTemplateTask extends Shell /** * BakeView instance * - * @var \Bake\View\BakeView + * @var \Bake\View\BakeView|null */ public $View; @@ -57,9 +57,9 @@ public function getView() $viewOptions = [ 'helpers' => [ 'Bake.Bake', - 'Bake.DocBlock' + 'Bake.DocBlock', ], - 'theme' => $theme + 'theme' => $theme, ]; $view = new BakeView(new Request(), new Response(), null, $viewOptions); diff --git a/app/vendor/cakephp/bake/src/Shell/Task/CellTask.php b/app/vendor/cakephp/bake/src/Shell/Task/CellTask.php index 685a79e49..f7135a826 100644 --- a/app/vendor/cakephp/bake/src/Shell/Task/CellTask.php +++ b/app/vendor/cakephp/bake/src/Shell/Task/CellTask.php @@ -117,7 +117,7 @@ public function getOptionParser() $parser = parent::getOptionParser(); $parser ->addOption('prefix', [ - 'help' => 'The namespace prefix to use.' + 'help' => 'The namespace prefix to use.', ]); return $parser; diff --git a/app/vendor/cakephp/bake/src/Shell/Task/ControllerTask.php b/app/vendor/cakephp/bake/src/Shell/Task/ControllerTask.php index 107f632c9..b44880ad8 100644 --- a/app/vendor/cakephp/bake/src/Shell/Task/ControllerTask.php +++ b/app/vendor/cakephp/bake/src/Shell/Task/ControllerTask.php @@ -35,7 +35,7 @@ class ControllerTask extends BakeTask public $tasks = [ 'Bake.Model', 'Bake.BakeTemplate', - 'Bake.Test' + 'Bake.Test', ]; /** @@ -125,7 +125,7 @@ public function bake($controllerName) $modelObj = TableRegistry::getTableLocator()->get($plugin . $currentModelName); } else { $modelObj = TableRegistry::getTableLocator()->get($plugin . $currentModelName, [ - 'connectionName' => $this->connection + 'connectionName' => $this->connection, ]); } @@ -142,7 +142,6 @@ public function bake($controllerName) $data = compact( 'actions', - 'admin', 'components', 'currentModelName', 'defaultModel', @@ -200,12 +199,12 @@ public function bakeController($controllerName, array $data) * Assembles and writes a unit test file * * @param string $className Controller class name - * @return string|bool Baked test + * @return string|false Baked test */ public function bakeTest($className) { if (!empty($this->params['no-test'])) { - return null; + return false; } $this->Test->plugin = $this->plugin; $this->Test->connection = $this->connection; @@ -270,24 +269,24 @@ public function getOptionParser() 'Bake a controller skeleton.' )->addArgument('name', [ 'help' => 'Name of the controller to bake (without the `Controller` suffix). ' . - 'You can use Plugin.name to bake controllers into plugins.' + 'You can use Plugin.name to bake controllers into plugins.', ])->addOption('components', [ - 'help' => 'The comma separated list of components to use.' + 'help' => 'The comma separated list of components to use.', ])->addOption('helpers', [ - 'help' => 'The comma separated list of helpers to use.' + 'help' => 'The comma separated list of helpers to use.', ])->addOption('prefix', [ - 'help' => 'The namespace/routing prefix to use.' + 'help' => 'The namespace/routing prefix to use.', ])->addOption('actions', [ 'help' => 'The comma separated list of actions to generate. ' . - 'You can include custom methods provided by your template set here.' + 'You can include custom methods provided by your template set here.', ])->addOption('no-test', [ 'boolean' => true, - 'help' => 'Do not generate a test skeleton.' + 'help' => 'Do not generate a test skeleton.', ])->addOption('no-actions', [ 'boolean' => true, - 'help' => 'Do not generate basic CRUD action methods.' + 'help' => 'Do not generate basic CRUD action methods.', ])->addSubcommand('all', [ - 'help' => 'Bake all controllers with CRUD methods.' + 'help' => 'Bake all controllers with CRUD methods.', ]); return $parser; diff --git a/app/vendor/cakephp/bake/src/Shell/Task/FixtureTask.php b/app/vendor/cakephp/bake/src/Shell/Task/FixtureTask.php index 492e44bc4..5b54e6d54 100644 --- a/app/vendor/cakephp/bake/src/Shell/Task/FixtureTask.php +++ b/app/vendor/cakephp/bake/src/Shell/Task/FixtureTask.php @@ -39,7 +39,7 @@ class FixtureTask extends BakeTask */ public $tasks = [ 'Bake.Model', - 'Bake.BakeTemplate' + 'Bake.BakeTemplate', ]; /** @@ -71,27 +71,27 @@ public function getOptionParser() 'Generate fixtures for use with the test suite. You can use `bake fixture all` to bake all fixtures.' )->addArgument('name', [ 'help' => 'Name of the fixture to bake (without the `Fixture` suffix). ' . - 'You can use Plugin.name to bake plugin fixtures.' + 'You can use Plugin.name to bake plugin fixtures.', ])->addOption('table', [ 'help' => 'The table name if it does not follow conventions.', ])->addOption('count', [ 'help' => 'When using generated data, the number of records to include in the fixture(s).', 'short' => 'n', - 'default' => 1 + 'default' => 1, ])->addOption('schema', [ 'help' => 'Create a fixture that imports schema, instead of dumping a schema snapshot into the fixture.', 'short' => 's', - 'boolean' => true + 'boolean' => true, ])->addOption('records', [ 'help' => 'Generate a fixture with records from the non-test database.' . ' Used with --count and --conditions to limit which records are added to the fixture.', 'short' => 'r', - 'boolean' => true + 'boolean' => true, ])->addOption('conditions', [ 'help' => 'The SQL snippet to use when importing records.', 'default' => '1=1', ])->addSubcommand('all', [ - 'help' => 'Bake all fixture files for tables in the chosen connection.' + 'help' => 'Bake all fixture files for tables in the chosen connection.', ]); return $parser; @@ -213,7 +213,7 @@ public function readSchema($name, $table) } else { $model = TableRegistry::getTableLocator()->get($name, [ 'table' => $table, - 'connection' => $connection + 'connection' => $connection, ]); } @@ -236,7 +236,7 @@ public function generateFixtureFile($model, array $otherVars) 'records' => null, 'import' => null, 'fields' => null, - 'namespace' => Configure::read('App.namespace') + 'namespace' => Configure::read('App.namespace'), ]; if ($this->plugin) { $defaults['namespace'] = $this->_pluginNamespace($this->plugin); @@ -366,7 +366,7 @@ protected function _generateRecords(TableSchema $table, $recordCount = 1) } else { $insert = "Lorem ipsum dolor sit amet"; if (!empty($fieldInfo['length'])) { - $insert = substr($insert, 0, (int)$fieldInfo['length'] - 2); + $insert = substr($insert, 0, (int)$fieldInfo['length'] > 2 ? (int)$fieldInfo['length'] - 2 : (int)$fieldInfo['length']); } } break; @@ -429,7 +429,7 @@ protected function _makeRecordString($records) } $out .= " [\n"; $out .= implode(",\n", $values); - $out .= "\n ],\n"; + $out .= ",\n ],\n"; } $out .= " ]"; @@ -453,7 +453,7 @@ protected function _getRecordsFromTable($modelName, $useTable = null) } else { $model = TableRegistry::getTableLocator()->get($modelName, [ 'table' => $useTable, - 'connection' => ConnectionManager::get($this->connection) + 'connection' => ConnectionManager::get($this->connection), ]); } $records = $model->find('all') diff --git a/app/vendor/cakephp/bake/src/Shell/Task/ModelTask.php b/app/vendor/cakephp/bake/src/Shell/Task/ModelTask.php index 3a6cad4a1..299cd0f4f 100644 --- a/app/vendor/cakephp/bake/src/Shell/Task/ModelTask.php +++ b/app/vendor/cakephp/bake/src/Shell/Task/ModelTask.php @@ -47,7 +47,7 @@ class ModelTask extends BakeTask public $tasks = [ 'Bake.Fixture', 'Bake.BakeTemplate', - 'Bake.Test' + 'Bake.Test', ]; /** @@ -193,7 +193,7 @@ public function getTableObject($className, $table) return TableRegistry::getTableLocator()->get($className, [ 'name' => $className, 'table' => $this->tablePrefix . $table, - 'connection' => ConnectionManager::get($this->connection) + 'connection' => ConnectionManager::get($this->connection), ]); } @@ -215,7 +215,7 @@ public function getAssociations(Table $table) $associations = [ 'belongsTo' => [], 'hasMany' => [], - 'belongsToMany' => [] + 'belongsToMany' => [], ]; $primary = $table->getPrimaryKey(); @@ -291,7 +291,7 @@ public function getAssociationInfo(Table $table) if ($tableClass === 'Cake\ORM\Table') { $namespace = $appNamespace; - $className = $association->className(); + $className = $association->getClassName(); if (strlen($className)) { list($plugin, $className) = pluginSplit($className); if ($plugin !== null) { @@ -306,7 +306,7 @@ public function getAssociationInfo(Table $table) } $info[$association->getName()] = [ - 'targetFqn' => '\\' . $tableClass + 'targetFqn' => '\\' . $tableClass, ]; } @@ -333,7 +333,7 @@ public function findBelongsTo($model, array $associations) $assoc = [ 'alias' => 'Parent' . $model->getAlias(), 'className' => $className, - 'foreignKey' => $fieldName + 'foreignKey' => $fieldName, ]; } else { $tmpModelName = $this->_modelNameFromKey($fieldName); @@ -345,7 +345,7 @@ public function findBelongsTo($model, array $associations) } $assoc = [ 'alias' => $tmpModelName, - 'foreignKey' => $fieldName + 'foreignKey' => $fieldName, ]; if ($schema->getColumn($fieldName)['null'] === false) { $assoc['joinType'] = 'INNER'; @@ -429,14 +429,14 @@ public function findHasMany($model, array $associations) if (!in_array($fieldName, $primaryKey) && $fieldName === $foreignKey) { $assoc = [ 'alias' => $otherModel->getAlias(), - 'foreignKey' => $fieldName + 'foreignKey' => $fieldName, ]; } elseif ($otherTableName === $tableName && $fieldName === 'parent_id') { $className = ($this->plugin) ? $this->plugin . '.' . $model->getAlias() : $model->getAlias(); $assoc = [ 'alias' => 'Child' . $model->getAlias(), 'className' => $className, - 'foreignKey' => $fieldName + 'foreignKey' => $fieldName, ]; } if ($assoc && $this->plugin && empty($assoc['className'])) { @@ -481,9 +481,9 @@ public function findBelongsToMany($model, array $associations) 'alias' => $habtmName, 'foreignKey' => $foreignKey, 'targetForeignKey' => $this->_modelKey($habtmName), - 'joinTable' => $otherTableName + 'joinTable' => $otherTableName, ]; - if ($assoc && $this->plugin) { + if ($this->plugin) { $assoc['className'] = $this->plugin . '.' . $assoc['alias']; } $associations['belongsToMany'][] = $assoc; @@ -556,9 +556,12 @@ public function getEntityPropertySchema(Table $model) $schema = $model->getSchema(); foreach ($schema->columns() as $column) { + $columnSchema = $schema->getColumn($column); + $properties[$column] = [ 'kind' => 'column', - 'type' => $schema->getColumnType($column) + 'type' => $columnSchema['type'], + 'null' => $columnSchema['null'], ]; } @@ -581,7 +584,7 @@ public function getEntityPropertySchema(Table $model) $properties[$association->getProperty()] = [ 'kind' => 'association', 'association' => $association, - 'type' => $entityClass + 'type' => $entityClass, ]; } @@ -717,14 +720,14 @@ public function fieldValidation($schema, $fieldName, array $metaData, $primaryKe $rules['numeric'] = []; if ($metaData['unsigned']) { $rules['greaterThanOrEqual'] = [ - 0 + 0, ]; } } elseif ($metaData['type'] === 'decimal') { $rules['decimal'] = []; if ($metaData['unsigned']) { $rules['greaterThanOrEqual'] = [ - 0 + 0, ]; } } elseif ($metaData['type'] === 'boolean') { @@ -746,20 +749,34 @@ public function fieldValidation($schema, $fieldName, array $metaData, $primaryKe } } - if (in_array($fieldName, $primaryKey)) { - $rules['allowEmpty'] = ["'create'"]; - } elseif ($metaData['null'] === true) { - $rules['allowEmpty'] = []; - } else { - $rules['requirePresence'] = ["'create'"]; - $rules['notEmpty'] = []; - } - $validation = []; foreach ($rules as $rule => $args) { $validation[$rule] = [ 'rule' => $rule, - 'args' => $args + 'args' => $args, + ]; + } + + if (in_array($fieldName, $primaryKey)) { + $validation['allowEmpty'] = [ + 'rule' => $this->getEmptyMethod($fieldName, $metaData), + 'args' => ['null', "'create'"], + ]; + } elseif ($metaData['null'] === true) { + $validation['allowEmpty'] = [ + 'rule' => $this->getEmptyMethod($fieldName, $metaData), + 'args' => [], + ]; + } else { + if ($metaData['default'] === null || $metaData['default'] === false) { + $validation['requirePresence'] = [ + 'rule' => 'requirePresence', + 'args' => ["'create'"], + ]; + } + $validation['notEmpty'] = [ + 'rule' => $this->getEmptyMethod($fieldName, $metaData, 'not'), + 'args' => [], ]; } @@ -778,6 +795,35 @@ public function fieldValidation($schema, $fieldName, array $metaData, $primaryKe return $validation; } + /** + * Get the specific allow empty method for field based on metadata. + * + * @param string $fieldName Field name. + * @param array $metaData Field meta data. + * @param string $prefix Method name prefix. + * @return string + */ + protected function getEmptyMethod($fieldName, array $metaData, $prefix = 'allow') + { + switch ($metaData['type']) { + case 'date': + return $prefix . 'EmptyDate'; + + case 'time': + return $prefix . 'EmptyTime'; + + case 'datetime': + case 'timestamp': + return $prefix . 'EmptyDateTime'; + } + + if (preg_match('/file|image/', $fieldName)) { + return $prefix . 'EmptyFile'; + } + + return $prefix . 'EmptyString'; + } + /** * Generate default rules checker. * @@ -842,7 +888,8 @@ public function getBehaviors($model) $behaviors['Timestamp'] = []; } - if (in_array('lft', $fields) && $schema->getColumnType('lft') === 'integer' && + if ( + in_array('lft', $fields) && $schema->getColumnType('lft') === 'integer' && in_array('rght', $fields) && $schema->getColumnType('rght') === 'integer' && in_array('parent_id', $fields) ) { @@ -914,7 +961,7 @@ public function bakeEntity($model, array $data = []) 'namespace' => $namespace, 'plugin' => $this->plugin, 'pluginPath' => $pluginPath, - 'primaryKey' => [] + 'primaryKey' => [], ]; $this->BakeTemplate->set($data); @@ -1086,47 +1133,47 @@ public function getOptionParser() 'Bake table and entity classes.' )->addArgument('name', [ 'help' => 'Name of the model to bake (without the Table suffix). ' . - 'You can use Plugin.name to bake plugin models.' + 'You can use Plugin.name to bake plugin models.', ])->addSubcommand('all', [ - 'help' => 'Bake all model files with associations and validation.' + 'help' => 'Bake all model files with associations and validation.', ])->addOption('table', [ - 'help' => 'The table name to use if you have non-conventional table names.' + 'help' => 'The table name to use if you have non-conventional table names.', ])->addOption('no-entity', [ 'boolean' => true, - 'help' => 'Disable generating an entity class.' + 'help' => 'Disable generating an entity class.', ])->addOption('no-table', [ 'boolean' => true, - 'help' => 'Disable generating a table class.' + 'help' => 'Disable generating a table class.', ])->addOption('no-validation', [ 'boolean' => true, - 'help' => 'Disable generating validation rules.' + 'help' => 'Disable generating validation rules.', ])->addOption('no-rules', [ 'boolean' => true, - 'help' => 'Disable generating a rules checker.' + 'help' => 'Disable generating a rules checker.', ])->addOption('no-associations', [ 'boolean' => true, - 'help' => 'Disable generating associations.' + 'help' => 'Disable generating associations.', ])->addOption('no-fields', [ 'boolean' => true, - 'help' => 'Disable generating accessible fields in the entity.' + 'help' => 'Disable generating accessible fields in the entity.', ])->addOption('fields', [ - 'help' => 'A comma separated list of fields to make accessible.' + 'help' => 'A comma separated list of fields to make accessible.', ])->addOption('no-hidden', [ 'boolean' => true, - 'help' => 'Disable generating hidden fields in the entity.' + 'help' => 'Disable generating hidden fields in the entity.', ])->addOption('hidden', [ - 'help' => 'A comma separated list of fields to hide.' + 'help' => 'A comma separated list of fields to hide.', ])->addOption('primary-key', [ 'help' => 'The primary key if you would like to manually set one.' . - ' Can be a comma separated list if you are using a composite primary key.' + ' Can be a comma separated list if you are using a composite primary key.', ])->addOption('display-field', [ - 'help' => 'The displayField if you would like to choose one.' + 'help' => 'The displayField if you would like to choose one.', ])->addOption('no-test', [ 'boolean' => true, - 'help' => 'Do not generate a test case skeleton.' + 'help' => 'Do not generate a test case skeleton.', ])->addOption('no-fixture', [ 'boolean' => true, - 'help' => 'Do not generate a test fixture skeleton.' + 'help' => 'Do not generate a test fixture skeleton.', ])->setEpilog( 'Omitting all arguments and options will list the table names you can generate models for' ); @@ -1157,12 +1204,12 @@ public function bakeFixture($className, $useTable = null) * Assembles and writes a unit test file * * @param string $className Model class name - * @return string|bool + * @return string|false */ public function bakeTest($className) { if (!empty($this->params['no-test'])) { - return null; + return false; } $this->Test->plugin = $this->plugin; $this->Test->interactive = $this->interactive; diff --git a/app/vendor/cakephp/bake/src/Shell/Task/PluginTask.php b/app/vendor/cakephp/bake/src/Shell/Task/PluginTask.php index 8cde50354..a80fc11f6 100644 --- a/app/vendor/cakephp/bake/src/Shell/Task/PluginTask.php +++ b/app/vendor/cakephp/bake/src/Shell/Task/PluginTask.php @@ -28,20 +28,13 @@ */ class PluginTask extends BakeTask { - /** - * Path to the bootstrap file. Changed in tests. - * - * @var string - */ - public $bootstrap = null; - /** * Tasks this task uses. * * @var array */ public $tasks = [ - 'Bake.BakeTemplate' + 'Bake.BakeTemplate', ]; /** @@ -59,7 +52,6 @@ class PluginTask extends BakeTask public function initialize() { $this->path = current(App::path('Plugin')); - $this->bootstrap = ROOT . DS . 'config' . DS . 'bootstrap.php'; } /** @@ -117,8 +109,8 @@ public function bake($plugin) $this->_generateFiles($plugin, $this->path); - $hasAutoloader = $this->_modifyAutoloader($plugin, $this->path); - $this->_modifyBootstrap($plugin, $hasAutoloader); + $this->_modifyAutoloader($plugin, $this->path); + $this->_modifyApplication($plugin); $this->hr(); $this->out(sprintf('Created: %s in %s', $plugin, $this->path . $plugin), 2); @@ -130,32 +122,22 @@ public function bake($plugin) } /** - * Update the app's bootstrap.php file. + * Modify the application class * * @param string $plugin Name of plugin - * @param bool $hasAutoloader Whether or not there is an autoloader configured for * the plugin * @return void */ - protected function _modifyBootstrap($plugin, $hasAutoloader) + protected function _modifyApplication($plugin) { - $bootstrap = new File($this->bootstrap, false); - if (!$bootstrap->exists()) { - $this->err('Could not update application bootstrap.php file, as it could not be found.'); + $application = new File(ROOT . DS . 'src' . DS . 'Application.php', false); + if (!$application->exists()) { + $this->err('Could not update application Application.php file, as it could not be found.'); return; } - $contents = $bootstrap->read(); - if (!preg_match("@\n\s*Plugin::loadAll@", $contents)) { - $autoload = $hasAutoloader ? null : "'autoload' => true, "; - $bootstrap->append(sprintf( - "\nPlugin::load('%s', [%s'bootstrap' => false, 'routes' => true]);\n", - $plugin, - $autoload - )); - $this->out(''); - $this->out(sprintf('%s modified', $this->bootstrap)); - } + + $this->dispatchShell('plugin', 'load', $plugin); } /** @@ -334,8 +316,8 @@ public function findPath(array $pathOptions) $this->out($i + 1 . '. ' . $option); } $prompt = 'Choose a plugin path from the paths above.'; - $choice = $this->in($prompt, null, 1); - if ((int)$choice > 0 && (int)$choice <= $max) { + $choice = (int)$this->in($prompt, null, '1'); + if ($choice > 0 && $choice <= $max) { $valid = true; } } @@ -354,10 +336,10 @@ public function getOptionParser() 'Create the directory structure, AppController class and testing setup for a new plugin. ' . 'Can create plugins in any of your bootstrapped plugin paths.' )->addArgument('name', [ - 'help' => 'CamelCased name of the plugin to create.' + 'help' => 'CamelCased name of the plugin to create.', ])->addOption('composer', [ 'default' => ROOT . DS . 'composer.phar', - 'help' => 'The path to the composer executable.' + 'help' => 'The path to the composer executable.', ])->removeOption('plugin'); return $parser; diff --git a/app/vendor/cakephp/bake/src/Shell/Task/SimpleBakeTask.php b/app/vendor/cakephp/bake/src/Shell/Task/SimpleBakeTask.php index edd6009d6..c13b2cd41 100644 --- a/app/vendor/cakephp/bake/src/Shell/Task/SimpleBakeTask.php +++ b/app/vendor/cakephp/bake/src/Shell/Task/SimpleBakeTask.php @@ -32,7 +32,7 @@ abstract class SimpleBakeTask extends BakeTask */ public $tasks = [ 'Bake.BakeTemplate', - 'Bake.Test' + 'Bake.Test', ]; /** @@ -144,10 +144,10 @@ public function getOptionParser() 'Name of the %s to bake. Can use Plugin.name to bake %s files into plugins.', $name, $name - ) + ), ])->addOption('no-test', [ 'boolean' => true, - 'help' => 'Do not generate a test skeleton.' + 'help' => 'Do not generate a test skeleton.', ]); return $parser; diff --git a/app/vendor/cakephp/bake/src/Shell/Task/TemplateTask.php b/app/vendor/cakephp/bake/src/Shell/Task/TemplateTask.php index f89d042e9..3bb28b426 100644 --- a/app/vendor/cakephp/bake/src/Shell/Task/TemplateTask.php +++ b/app/vendor/cakephp/bake/src/Shell/Task/TemplateTask.php @@ -38,7 +38,7 @@ class TemplateTask extends BakeTask */ public $tasks = [ 'Bake.Model', - 'Bake.BakeTemplate' + 'Bake.BakeTemplate', ]; /** @@ -279,7 +279,7 @@ protected function _loadController() $modelObject = TableRegistry::getTableLocator()->get($this->modelName); } else { $modelObject = TableRegistry::getTableLocator()->get($this->modelName, [ - 'connectionName' => $this->connection + 'connectionName' => $this->connection, ]); } @@ -398,20 +398,20 @@ public function getOptionParser() $parser->setDescription( 'Bake views for a controller, using built-in or custom templates. ' )->addArgument('controller', [ - 'help' => 'Name of the controller views to bake. You can use Plugin.name as a shortcut for plugin baking.' + 'help' => 'Name of the controller views to bake. You can use Plugin.name as a shortcut for plugin baking.', ])->addArgument('action', [ - 'help' => "Will bake a single action's file. core templates are (index, add, edit, view)" + 'help' => "Will bake a single action's file. core templates are (index, add, edit, view)", ])->addArgument('alias', [ - 'help' => 'Will bake the template in but create the filename after .' + 'help' => 'Will bake the template in but create the filename after .', ])->addOption('controller', [ - 'help' => 'The controller name if you have a controller that does not follow conventions.' + 'help' => 'The controller name if you have a controller that does not follow conventions.', ])->addOption('prefix', [ 'help' => 'The routing prefix to generate views for.', ])->addOption('index-columns', [ 'help' => 'Limit for the number of index columns', - 'default' => 0 + 'default' => 0, ])->addSubcommand('all', [ - 'help' => '[optional] Bake all CRUD action views for all controllers. Requires models and controllers to exist.' + 'help' => '[optional] Bake all CRUD action views for all controllers. Requires models and controllers to exist.', ]); return $parser; diff --git a/app/vendor/cakephp/bake/src/Shell/Task/TestTask.php b/app/vendor/cakephp/bake/src/Shell/Task/TestTask.php index a84c75f18..e6dacdc5d 100644 --- a/app/vendor/cakephp/bake/src/Shell/Task/TestTask.php +++ b/app/vendor/cakephp/bake/src/Shell/Task/TestTask.php @@ -217,7 +217,7 @@ protected function _getClassOptions($namespace) * * @param string $type Type of object to bake test case for ie. Model, Controller * @param string $className the 'cake name' for the class ie. Posts for the PostsController - * @return string|bool + * @return string|false */ public function bake($type, $className) { @@ -323,7 +323,7 @@ public function buildTestSubject($type, $class) $instance = TableRegistry::getTableLocator()->get($name); } else { $instance = TableRegistry::getTableLocator()->get($name, [ - 'connectionName' => $this->connection + 'connectionName' => $this->connection, ]); } } elseif ($type === 'Controller') { @@ -487,7 +487,7 @@ protected function _processController($subject) protected function _addFixture($name) { if ($this->plugin) { - $prefix = 'plugin.' . Inflector::underscore($this->plugin) . '.'; + $prefix = 'plugin.' . $this->plugin . '.'; } else { $prefix = 'app.'; } @@ -582,12 +582,12 @@ public function generateProperties($type, $subject, $fullClassName) $properties[] = [ 'description' => 'Request mock', 'type' => '\Cake\Http\ServerRequest|\PHPUnit_Framework_MockObject_MockObject', - 'name' => 'request' + 'name' => 'request', ]; $properties[] = [ 'description' => 'Response mock', 'type' => '\Cake\Http\Response|\PHPUnit_Framework_MockObject_MockObject', - 'name' => 'response' + 'name' => 'response', ]; break; @@ -596,7 +596,7 @@ public function generateProperties($type, $subject, $fullClassName) $properties[] = [ 'description' => 'ConsoleIo mock', 'type' => '\Cake\Console\ConsoleIo|\PHPUnit_Framework_MockObject_MockObject', - 'name' => 'io' + 'name' => 'io', ]; break; @@ -604,12 +604,12 @@ public function generateProperties($type, $subject, $fullClassName) $properties[] = [ 'description' => 'ConsoleOutput stub', 'type' => '\Cake\TestSuite\Stub\ConsoleOutput', - 'name' => 'stub' + 'name' => 'stub', ]; $properties[] = [ 'description' => 'ConsoleIo mock', 'type' => '\Cake\Console\ConsoleIo', - 'name' => 'io' + 'name' => 'io', ]; break; } @@ -618,7 +618,7 @@ public function generateProperties($type, $subject, $fullClassName) $properties[] = [ 'description' => 'Test subject', 'type' => '\\' . $fullClassName, - 'name' => $subject + 'name' => $subject, ]; } @@ -710,19 +710,19 @@ public function getOptionParser() ' controller, model, helper, component or behavior.', 'choices' => $types, ])->addArgument('name', [ - 'help' => 'An existing class to bake tests for.' + 'help' => 'An existing class to bake tests for.', ])->addOption('fixtures', [ - 'help' => 'A comma separated list of fixture names you want to include.' + 'help' => 'A comma separated list of fixture names you want to include.', ])->addOption('no-fixture', [ 'boolean' => true, 'default' => false, - 'help' => 'Select if you want to bake without fixture.' + 'help' => 'Select if you want to bake without fixture.', ])->addOption('prefix', [ 'default' => false, - 'help' => 'Use when baking tests for prefixed controllers.' + 'help' => 'Use when baking tests for prefixed controllers.', ])->addOption('all', [ 'boolean' => true, - 'help' => 'Bake all classes of the given type' + 'help' => 'Bake all classes of the given type', ]); return $parser; diff --git a/app/vendor/cakephp/bake/src/Template/Bake/Command/command.twig b/app/vendor/cakephp/bake/src/Template/Bake/Command/command.twig index a0e4ccf49..f41ab6562 100644 --- a/app/vendor/cakephp/bake/src/Template/Bake/Command/command.twig +++ b/app/vendor/cakephp/bake/src/Template/Bake/Command/command.twig @@ -26,7 +26,6 @@ use Cake\Console\ConsoleOptionParser; */ class {{ name }}Command extends Command { - /** * Hook method for defining this command's option parser. * diff --git a/app/vendor/cakephp/bake/src/Template/Bake/Controller/component.twig b/app/vendor/cakephp/bake/src/Template/Bake/Controller/component.twig index 65ba0b97f..dce0e9d68 100644 --- a/app/vendor/cakephp/bake/src/Template/Bake/Controller/component.twig +++ b/app/vendor/cakephp/bake/src/Template/Bake/Controller/component.twig @@ -24,7 +24,6 @@ use Cake\Controller\ComponentRegistry; */ class {{ name }}Component extends Component { - /** * Default configuration. * diff --git a/app/vendor/cakephp/bake/src/Template/Bake/Controller/controller.twig b/app/vendor/cakephp/bake/src/Template/Bake/Controller/controller.twig index 9558878aa..47097329f 100644 --- a/app/vendor/cakephp/bake/src/Template/Bake/Controller/controller.twig +++ b/app/vendor/cakephp/bake/src/Template/Bake/Controller/controller.twig @@ -44,14 +44,21 @@ class {{ name }}Controller extends AppController {% set helpers = Bake.arrayProperty('helpers', helpers, {'indent': false})|raw %} {% if helpers|trim %} {{- helpers|raw }} -{% endif %} +{% if components %} +{% endif %} +{% endif %} {%- set components = Bake.arrayProperty('components', components, {'indent': false})|raw %} {% if components|trim %} {{- components|raw }} -{% endif %} +{% if actions %} +{% endif %} +{% endif %} {%- for action in actions %} +{% if loop.index > 1 %} + +{% endif %} {%- element 'Controller/' ~ action %} {% endfor %} } diff --git a/app/vendor/cakephp/bake/src/Template/Bake/Element/Controller/add.twig b/app/vendor/cakephp/bake/src/Template/Bake/Element/Controller/add.twig index 1c67f5e20..dc7c0f67d 100644 --- a/app/vendor/cakephp/bake/src/Template/Bake/Element/Controller/add.twig +++ b/app/vendor/cakephp/bake/src/Template/Bake/Element/Controller/add.twig @@ -14,7 +14,6 @@ */ #} {% set compact = ["'#{singularName}'"] %} - /** * Add method * diff --git a/app/vendor/cakephp/bake/src/Template/Bake/Element/Controller/delete.twig b/app/vendor/cakephp/bake/src/Template/Bake/Element/Controller/delete.twig index 2fbbf6db1..69c0cfc58 100644 --- a/app/vendor/cakephp/bake/src/Template/Bake/Element/Controller/delete.twig +++ b/app/vendor/cakephp/bake/src/Template/Bake/Element/Controller/delete.twig @@ -13,7 +13,6 @@ * @license http://www.opensource.org/licenses/mit-license.php MIT License */ #} - /** * Delete method * diff --git a/app/vendor/cakephp/bake/src/Template/Bake/Element/Controller/edit.twig b/app/vendor/cakephp/bake/src/Template/Bake/Element/Controller/edit.twig index d06cb9c77..82e9be313 100644 --- a/app/vendor/cakephp/bake/src/Template/Bake/Element/Controller/edit.twig +++ b/app/vendor/cakephp/bake/src/Template/Bake/Element/Controller/edit.twig @@ -16,18 +16,17 @@ {% set belongsTo = Bake.aliasExtractor(modelObj, 'BelongsTo') %} {% set belongsToMany = Bake.aliasExtractor(modelObj, 'belongsToMany') %} {% set compact = ["'#{singularName}'"] %} - /** * Edit method * * @param string|null $id {{ singularHumanName }} id. * @return \Cake\Http\Response|null Redirects on successful edit, renders view otherwise. - * @throws \Cake\Network\Exception\NotFoundException When record not found. + * @throws \Cake\Datasource\Exception\RecordNotFoundException When record not found. */ public function edit($id = null) { ${{ singularName }} = $this->{{ currentModelName }}->get($id, [ - 'contain' => [{{ Bake.stringifyList(belongsToMany, {'indent': false})|raw }}] + 'contain' => [{{ Bake.stringifyList(belongsToMany, {'indent': false})|raw }}], ]); if ($this->request->is(['patch', 'post', 'put'])) { ${{ singularName }} = $this->{{ currentModelName }}->patchEntity(${{ singularName }}, $this->request->getData()); diff --git a/app/vendor/cakephp/bake/src/Template/Bake/Element/Controller/index.twig b/app/vendor/cakephp/bake/src/Template/Bake/Element/Controller/index.twig index 181e830b4..9f98e0d9d 100644 --- a/app/vendor/cakephp/bake/src/Template/Bake/Element/Controller/index.twig +++ b/app/vendor/cakephp/bake/src/Template/Bake/Element/Controller/index.twig @@ -13,18 +13,17 @@ * @license http://www.opensource.org/licenses/mit-license.php MIT License */ #} - /** * Index method * - * @return \Cake\Http\Response|void + * @return \Cake\Http\Response|null */ public function index() { {% set belongsTo = Bake.aliasExtractor(modelObj, 'BelongsTo') %} {% if belongsTo %} $this->paginate = [ - 'contain' => [{{ Bake.stringifyList(belongsTo, {'indent': false})|raw }}] + 'contain' => [{{ Bake.stringifyList(belongsTo, {'indent': false})|raw }}], ]; {% endif %} ${{ pluralName }} = $this->paginate($this->{{ currentModelName }}); diff --git a/app/vendor/cakephp/bake/src/Template/Bake/Element/Controller/login.twig b/app/vendor/cakephp/bake/src/Template/Bake/Element/Controller/login.twig index ee473edad..97836e0a6 100644 --- a/app/vendor/cakephp/bake/src/Template/Bake/Element/Controller/login.twig +++ b/app/vendor/cakephp/bake/src/Template/Bake/Element/Controller/login.twig @@ -13,7 +13,6 @@ * @license http://www.opensource.org/licenses/mit-license.php MIT License */ #} - /** * Login method * diff --git a/app/vendor/cakephp/bake/src/Template/Bake/Element/Controller/logout.twig b/app/vendor/cakephp/bake/src/Template/Bake/Element/Controller/logout.twig index facbd2fe6..4a6475740 100644 --- a/app/vendor/cakephp/bake/src/Template/Bake/Element/Controller/logout.twig +++ b/app/vendor/cakephp/bake/src/Template/Bake/Element/Controller/logout.twig @@ -13,7 +13,6 @@ * @license http://www.opensource.org/licenses/mit-license.php MIT License */ #} - /** * Logout method * diff --git a/app/vendor/cakephp/bake/src/Template/Bake/Element/Controller/view.twig b/app/vendor/cakephp/bake/src/Template/Bake/Element/Controller/view.twig index 7091ba4a1..94e2cf0ae 100644 --- a/app/vendor/cakephp/bake/src/Template/Bake/Element/Controller/view.twig +++ b/app/vendor/cakephp/bake/src/Template/Bake/Element/Controller/view.twig @@ -17,18 +17,17 @@ {% set allAssociations = allAssociations|merge(Bake.aliasExtractor(modelObj, 'BelongsToMany')) %} {% set allAssociations = allAssociations|merge(Bake.aliasExtractor(modelObj, 'HasOne')) %} {% set allAssociations = allAssociations|merge(Bake.aliasExtractor(modelObj, 'HasMany')) %} - /** * View method * * @param string|null $id {{ singularHumanName }} id. - * @return \Cake\Http\Response|void + * @return \Cake\Http\Response|null * @throws \Cake\Datasource\Exception\RecordNotFoundException When record not found. */ public function view($id = null) { ${{ singularName }} = $this->{{ currentModelName }}->get($id, [ - 'contain' => [{{ Bake.stringifyList(allAssociations, {'indent': false})|raw }}] + 'contain' => [{{ Bake.stringifyList(allAssociations, {'indent': false})|raw }}], ]); $this->set('{{ singularName }}', ${{ singularName }}); diff --git a/app/vendor/cakephp/bake/src/Template/Bake/Element/array_property.twig b/app/vendor/cakephp/bake/src/Template/Bake/Element/array_property.twig index d177d81a6..ff5bd9fe1 100644 --- a/app/vendor/cakephp/bake/src/Template/Bake/Element/array_property.twig +++ b/app/vendor/cakephp/bake/src/Template/Bake/Element/array_property.twig @@ -1,4 +1,3 @@ - /** * {{ name|humanize }} * diff --git a/app/vendor/cakephp/bake/src/Template/Bake/Form/form.twig b/app/vendor/cakephp/bake/src/Template/Bake/Form/form.twig index 835c42c6e..32bd7d513 100644 --- a/app/vendor/cakephp/bake/src/Template/Bake/Form/form.twig +++ b/app/vendor/cakephp/bake/src/Template/Bake/Form/form.twig @@ -48,7 +48,7 @@ class {{ name }}Form extends Form } /** - * Defines what to execute once the From is being processed + * Defines what to execute once the Form is processed * * @param array $data Form data. * @return bool diff --git a/app/vendor/cakephp/bake/src/Template/Bake/Mailer/mailer.twig b/app/vendor/cakephp/bake/src/Template/Bake/Mailer/mailer.twig index 621e9d6fe..75652dd5e 100644 --- a/app/vendor/cakephp/bake/src/Template/Bake/Mailer/mailer.twig +++ b/app/vendor/cakephp/bake/src/Template/Bake/Mailer/mailer.twig @@ -23,11 +23,10 @@ use Cake\Mailer\Mailer; */ class {{ name }}Mailer extends Mailer { - /** * Mailer's name. * * @var string */ - static public $name = '{{ name }}'; + public static $name = '{{ name }}'; } diff --git a/app/vendor/cakephp/bake/src/Template/Bake/Middleware/middleware.twig b/app/vendor/cakephp/bake/src/Template/Bake/Middleware/middleware.twig index d7e80c6a3..17b858b77 100644 --- a/app/vendor/cakephp/bake/src/Template/Bake/Middleware/middleware.twig +++ b/app/vendor/cakephp/bake/src/Template/Bake/Middleware/middleware.twig @@ -24,7 +24,6 @@ use Psr\Http\Message\ServerRequestInterface; */ class {{ name }}Middleware { - /** * Invoke method. * diff --git a/app/vendor/cakephp/bake/src/Template/Bake/Model/behavior.twig b/app/vendor/cakephp/bake/src/Template/Bake/Model/behavior.twig index 3f42750ca..211b56064 100644 --- a/app/vendor/cakephp/bake/src/Template/Bake/Model/behavior.twig +++ b/app/vendor/cakephp/bake/src/Template/Bake/Model/behavior.twig @@ -24,7 +24,6 @@ use Cake\ORM\Table; */ class {{ name }}Behavior extends Behavior { - /** * Default configuration. * diff --git a/app/vendor/cakephp/bake/src/Template/Bake/Model/entity.twig b/app/vendor/cakephp/bake/src/Template/Bake/Model/entity.twig index e09794a3d..9618d8c94 100644 --- a/app/vendor/cakephp/bake/src/Template/Bake/Model/entity.twig +++ b/app/vendor/cakephp/bake/src/Template/Bake/Model/entity.twig @@ -32,7 +32,6 @@ use Cake\ORM\Entity; class {{ name }} extends Entity { {% if accessible %} - /** * Fields that can be mass assigned using newEntity() or patchEntity(). * @@ -44,9 +43,10 @@ class {{ name }} extends Entity */ protected $_accessible = [{{ Bake.stringifyList(accessible, {'quotes': false})|raw }}]; {% endif %} +{% if accessible and hidden %} +{% endif %} {%- if hidden %} - /** * Fields that are excluded from JSON versions of the entity. * @@ -54,8 +54,4 @@ class {{ name }} extends Entity */ protected $_hidden = [{{ Bake.stringifyList(hidden)|raw }}]; {% endif %} - -{%- if not accessible and not hidden %} - -{% endif %} } diff --git a/app/vendor/cakephp/bake/src/Template/Bake/Model/table.twig b/app/vendor/cakephp/bake/src/Template/Bake/Model/table.twig index 94ad17cb9..34c7950f0 100644 --- a/app/vendor/cakephp/bake/src/Template/Bake/Model/table.twig +++ b/app/vendor/cakephp/bake/src/Template/Bake/Model/table.twig @@ -23,7 +23,6 @@ namespace {{ namespace }}\Model\Table; {{ DocBlock.classDescription(name, 'Model', annotations)|raw }} class {{ name }}Table extends Table { - /** * Initialize method * diff --git a/app/vendor/cakephp/bake/src/Template/Bake/Plugin/.gitignore.twig b/app/vendor/cakephp/bake/src/Template/Bake/Plugin/.gitignore.twig index bc959c533..2bcbfb6a9 100644 --- a/app/vendor/cakephp/bake/src/Template/Bake/Plugin/.gitignore.twig +++ b/app/vendor/cakephp/bake/src/Template/Bake/Plugin/.gitignore.twig @@ -1,3 +1,4 @@ /composer.lock /phpunit.xml /vendor +config/Migrations/schema-dump-default.lock diff --git a/app/vendor/cakephp/bake/src/Template/Bake/Plugin/README.md.twig b/app/vendor/cakephp/bake/src/Template/Bake/Plugin/README.md.twig index 8ede8ffc0..0763927b5 100644 --- a/app/vendor/cakephp/bake/src/Template/Bake/Plugin/README.md.twig +++ b/app/vendor/cakephp/bake/src/Template/Bake/Plugin/README.md.twig @@ -17,7 +17,7 @@ ## Installation -You can install this plugin into your CakePHP application using [composer](http://getcomposer.org). +You can install this plugin into your CakePHP application using [composer](https://getcomposer.org). The recommended way to install composer packages is: diff --git a/app/vendor/cakephp/bake/src/Template/Bake/Plugin/phpunit.xml.dist.twig b/app/vendor/cakephp/bake/src/Template/Bake/Plugin/phpunit.xml.dist.twig index cc31f7e37..2653e666e 100644 --- a/app/vendor/cakephp/bake/src/Template/Bake/Plugin/phpunit.xml.dist.twig +++ b/app/vendor/cakephp/bake/src/Template/Bake/Plugin/phpunit.xml.dist.twig @@ -18,7 +18,6 @@ colors="true" processIsolation="false" stopOnFailure="false" - syntaxCheck="false" bootstrap="tests/bootstrap.php" > @@ -35,9 +34,9 @@ - + - + diff --git a/app/vendor/cakephp/bake/src/Template/Bake/Plugin/src/Controller/AppController.php.twig b/app/vendor/cakephp/bake/src/Template/Bake/Plugin/src/Controller/AppController.php.twig index d06ea6823..2f82948ae 100644 --- a/app/vendor/cakephp/bake/src/Template/Bake/Plugin/src/Controller/AppController.php.twig +++ b/app/vendor/cakephp/bake/src/Template/Bake/Plugin/src/Controller/AppController.php.twig @@ -21,5 +21,4 @@ use {{ baseNamespace }}\Controller\AppController as BaseController; class AppController extends BaseController { - } diff --git a/app/vendor/cakephp/bake/src/Template/Bake/Plugin/tests/bootstrap.php.twig b/app/vendor/cakephp/bake/src/Template/Bake/Plugin/tests/bootstrap.php.twig index 32ca2be72..c8c3108f7 100644 --- a/app/vendor/cakephp/bake/src/Template/Bake/Plugin/tests/bootstrap.php.twig +++ b/app/vendor/cakephp/bake/src/Template/Bake/Plugin/tests/bootstrap.php.twig @@ -39,9 +39,17 @@ unset($findRoot); chdir($root); +require_once $root . '/vendor/autoload.php'; + +/** + * Define fallback values for required constants and configuration. + * To customize constants and configuration remove this require + * and define the data required by your plugin here. + */ +require_once $root . '/vendor/cakephp/cakephp/tests/bootstrap.php'; + if (file_exists($root . '/config/bootstrap.php')) { require $root . '/config/bootstrap.php'; return; } -require $root . '/vendor/cakephp/cakephp/tests/bootstrap.php'; diff --git a/app/vendor/cakephp/bake/src/Template/Bake/Shell/helper.twig b/app/vendor/cakephp/bake/src/Template/Bake/Shell/helper.twig index a9284d560..7488d671b 100644 --- a/app/vendor/cakephp/bake/src/Template/Bake/Shell/helper.twig +++ b/app/vendor/cakephp/bake/src/Template/Bake/Shell/helper.twig @@ -23,7 +23,6 @@ use Cake\Console\Helper; */ class {{ name }}Helper extends Helper { - /** * Output method. * diff --git a/app/vendor/cakephp/bake/src/Template/Bake/Shell/shell.twig b/app/vendor/cakephp/bake/src/Template/Bake/Shell/shell.twig index c0c16b8e9..dbd438304 100644 --- a/app/vendor/cakephp/bake/src/Template/Bake/Shell/shell.twig +++ b/app/vendor/cakephp/bake/src/Template/Bake/Shell/shell.twig @@ -23,7 +23,6 @@ use Cake\Console\Shell; */ class {{ name }}Shell extends Shell { - /** * Manage the available sub-commands along with their arguments and help * diff --git a/app/vendor/cakephp/bake/src/Template/Bake/Shell/task.twig b/app/vendor/cakephp/bake/src/Template/Bake/Shell/task.twig index 7000f5ddd..5c7b7fce6 100644 --- a/app/vendor/cakephp/bake/src/Template/Bake/Shell/task.twig +++ b/app/vendor/cakephp/bake/src/Template/Bake/Shell/task.twig @@ -22,7 +22,6 @@ use Cake\Console\Shell; */ class {{ name }}Task extends Shell { - /** * Manage the available sub-commands along with their arguments and help * diff --git a/app/vendor/cakephp/bake/src/Template/Bake/View/cell.twig b/app/vendor/cakephp/bake/src/Template/Bake/View/cell.twig index 741767341..403ffe3e3 100644 --- a/app/vendor/cakephp/bake/src/Template/Bake/View/cell.twig +++ b/app/vendor/cakephp/bake/src/Template/Bake/View/cell.twig @@ -23,7 +23,6 @@ use Cake\View\Cell; */ class {{ name }}Cell extends Cell { - /** * List of valid options that can be passed into this * cell's constructor. diff --git a/app/vendor/cakephp/bake/src/Template/Bake/View/helper.twig b/app/vendor/cakephp/bake/src/Template/Bake/View/helper.twig index cddf60aac..dac43f2b8 100644 --- a/app/vendor/cakephp/bake/src/Template/Bake/View/helper.twig +++ b/app/vendor/cakephp/bake/src/Template/Bake/View/helper.twig @@ -24,7 +24,6 @@ use Cake\View\View; */ class {{ name }}Helper extends Helper { - /** * Default configuration. * diff --git a/app/vendor/cakephp/bake/src/Template/Bake/tests/fixture.twig b/app/vendor/cakephp/bake/src/Template/Bake/tests/fixture.twig index 73061dadf..63e5b4012 100644 --- a/app/vendor/cakephp/bake/src/Template/Bake/tests/fixture.twig +++ b/app/vendor/cakephp/bake/src/Template/Bake/tests/fixture.twig @@ -24,12 +24,10 @@ use Cake\TestSuite\Fixture\TestFixture; /** * {{ name }}Fixture - * */ class {{ name }}Fixture extends TestFixture { {% if table %} - /** * Table name * @@ -39,17 +37,16 @@ class {{ name }}Fixture extends TestFixture {% endif %} {%- if import %} - /** * Import * * @var array */ public $import = {{ import|raw }}; + {% endif %} {%- if schema %} - /** * Fields * @@ -61,7 +58,6 @@ class {{ name }}Fixture extends TestFixture {% endif %} {%- if records %} - /** * Init method * diff --git a/app/vendor/cakephp/bake/src/Template/Bake/tests/test_case.twig b/app/vendor/cakephp/bake/src/Template/Bake/tests/test_case.twig index d652502df..3f50cd40b 100644 --- a/app/vendor/cakephp/bake/src/Template/Bake/tests/test_case.twig +++ b/app/vendor/cakephp/bake/src/Template/Bake/tests/test_case.twig @@ -19,13 +19,14 @@ {% set isShell = type|lower == 'shell' %} {% set isCommand = type|lower == 'command' %} {% if isController %} - {%- set superClassName = 'IntegrationTestCase' %} + {%- set traitName = 'IntegrationTestTrait' %} {% elseif isShell or isCommand %} - {%- set superClassName = 'ConsoleIntegrationTestCase' %} -{% else %} - {%- set superClassName = 'TestCase' %} + {%- set traitName = 'ConsoleIntegrationTestTrait' %} +{% endif %} +{%- set uses = uses|merge(["Cake\\TestSuite\\TestCase"]) %} +{% if traitName %} + {%- set uses = uses|merge(["Cake\\TestSuite\\#{traitName}"]) %} {% endif %} -{%- set uses = uses|merge(["Cake\\TestSuite\\#{superClassName}"]) %} {%- set uses = uses|sort %} 1 %} +{% endif %} /** * {{ propertyInfo.description }} * * @var {{ propertyInfo.type }} */ public ${{ propertyInfo.name }}{% if propertyInfo.value is defined and propertyInfo.value %} = {{ propertyInfo.value }}{% endif %}; +{% if loop.last and (fixtures or construction or methods) %} + +{% endif %} {% endfor %} {% endif %} {%- if fixtures %} - /** * Fixtures * * @var array */ public $fixtures = [{{ Bake.stringifyList(fixtures|values)|raw }}]; +{% if construction or methods %} + +{% endif %} {% endif %} {%- if construction %} - /** * setUp method * @@ -97,11 +114,16 @@ class {{ className }}Test extends {{ superClassName }} parent::tearDown(); } +{% if methods %} + +{% endif %} {% endif %} {% endif %} {%- for method in methods %} +{% if loop.index > 1 %} +{% endif %} /** * Test {{ method }} method * @@ -114,7 +136,9 @@ class {{ className }}Test extends {{ superClassName }} {% endfor %} {%- if not methods %} +{%- if traitName or properties or fixtures or construction or methods %} +{% endif %} /** * Test initial setup * diff --git a/app/vendor/cakephp/bake/src/Utility/CommonOptionsTrait.php b/app/vendor/cakephp/bake/src/Utility/CommonOptionsTrait.php index 739d5ad15..ab0c56e6c 100644 --- a/app/vendor/cakephp/bake/src/Utility/CommonOptionsTrait.php +++ b/app/vendor/cakephp/bake/src/Utility/CommonOptionsTrait.php @@ -19,7 +19,6 @@ trait CommonOptionsTrait { - /** * Set common options used by all bake tasks. * @@ -38,20 +37,20 @@ protected function _setCommonOptions($parser) $parser->addOption('plugin', [ 'short' => 'p', - 'help' => 'Plugin to bake into.' + 'help' => 'Plugin to bake into.', ])->addOption('force', [ 'short' => 'f', 'boolean' => true, - 'help' => 'Force overwriting existing files without prompting.' + 'help' => 'Force overwriting existing files without prompting.', ])->addOption('connection', [ 'short' => 'c', 'default' => 'default', - 'help' => 'The datasource connection to get data from.' + 'help' => 'The datasource connection to get data from.', ])->addOption('theme', [ 'short' => 't', 'help' => 'The theme to use when baking code.', 'default' => Configure::read('Bake.theme'), - 'choices' => $bakeThemes + 'choices' => $bakeThemes, ]); return $parser; diff --git a/app/vendor/cakephp/bake/src/Utility/Model/AssociationFilter.php b/app/vendor/cakephp/bake/src/Utility/Model/AssociationFilter.php index 058ab1222..573ecacdb 100644 --- a/app/vendor/cakephp/bake/src/Utility/Model/AssociationFilter.php +++ b/app/vendor/cakephp/bake/src/Utility/Model/AssociationFilter.php @@ -20,11 +20,9 @@ /** * Utility class to filter Model Table associations - * */ class AssociationFilter { - /** * Detect existing belongsToMany associations and cleanup the hasMany aliases based on existing * belongsToMany associations provided diff --git a/app/vendor/cakephp/bake/src/View/BakeView.php b/app/vendor/cakephp/bake/src/View/BakeView.php index 61cc096a3..aebf5592c 100644 --- a/app/vendor/cakephp/bake/src/View/BakeView.php +++ b/app/vendor/cakephp/bake/src/View/BakeView.php @@ -51,7 +51,7 @@ class BakeView extends TwigView protected $_defaultConfig = [ 'phpTagReplacements' => [ ' "' => "CakePHPBakeCloseTag>" + '?>' => "CakePHPBakeCloseTag>", ], 'replacements' => [ '/\n[ \t]+<%-( |$)/' => "\n<% ", @@ -59,8 +59,8 @@ class BakeView extends TwigView '/<%=(.*)\%>\n(.)/' => "<%=$1%>\n\n$2", '<%=' => ' '' => '?>' - ] + '%>' => '?>', + ], ]; /** @@ -142,10 +142,10 @@ public function render($view = null, $layout = null) $this->_currentType = static::TYPE_TEMPLATE; $this->dispatchEvent('View.beforeRender', [$viewFileName]); - $this->dispatchEvent('View.beforeRender.' . $templateEventName, [$viewFileName]); + $this->dispatchEvent('View.beforeRender' . $templateEventName, [$viewFileName]); $this->Blocks->set('content', $this->_render($viewFileName)); $this->dispatchEvent('View.afterRender', [$viewFileName]); - $this->dispatchEvent('View.afterRender.' . $templateEventName, [$viewFileName]); + $this->dispatchEvent('View.afterRender' . $templateEventName, [$viewFileName]); if ($layout === null) { $layout = $this->layout; diff --git a/app/vendor/cakephp/bake/src/View/Helper/BakeHelper.php b/app/vendor/cakephp/bake/src/View/Helper/BakeHelper.php index 191f797ce..74e028bf1 100644 --- a/app/vendor/cakephp/bake/src/View/Helper/BakeHelper.php +++ b/app/vendor/cakephp/bake/src/View/Helper/BakeHelper.php @@ -47,7 +47,7 @@ public function arrayProperty($name, array $value = [], array $options = []) } $options += [ 'name' => $name, - 'value' => $value + 'value' => $value, ]; return $this->_View->element('array_property', $options); @@ -62,12 +62,13 @@ public function arrayProperty($name, array $value = [], array $options = []) */ public function stringifyList(array $list, array $options = []) { - $options += [ + $defaults = [ 'indent' => 2, 'tab' => ' ', - 'trailingComma' => false, - 'quotes' => true + 'trailingComma' => (!isset($options['indent']) || $options['indent']) ? true : false, + 'quotes' => true, ]; + $options += $defaults; if (!$list) { return ''; @@ -179,7 +180,7 @@ public function classInfo($class, $type, $suffix) 'plugin' => $plugin, 'class' => $name . $suffix, 'name' => $name, - 'fullName' => $class + 'fullName' => $class, ]; } @@ -246,14 +247,16 @@ public function getViewFieldsData($fields, $schema, $associations) if (isset($associationFields[$field])) { return 'string'; } - if (in_array($type, [ + if ( + in_array($type, [ 'decimal', 'biginteger', 'integer', 'float', 'smallinteger', 'tinyinteger', - ])) { + ]) + ) { return 'number'; } if (in_array($type, ['date', 'time', 'datetime', 'timestamp'])) { @@ -338,30 +341,6 @@ public function getValidationMethods($field, $rules) $rule['provider'] ); } - - if (isset($rule['allowEmpty'])) { - if (is_string($rule['allowEmpty'])) { - $validationMethods[] = sprintf( - "->allowEmpty('%s', '%s')", - $field, - $rule['allowEmpty'] - ); - } elseif ($rule['allowEmpty']) { - $validationMethods[] = sprintf( - "->allowEmpty('%s')", - $field - ); - } else { - $validationMethods[] = sprintf( - "->requirePresence('%s', 'create')", - $field - ); - $validationMethods[] = sprintf( - "->notEmpty('%s')", - $field - ); - } - } } return $validationMethods; diff --git a/app/vendor/cakephp/bake/src/View/Helper/DocBlockHelper.php b/app/vendor/cakephp/bake/src/View/Helper/DocBlockHelper.php index de919a8ac..2de3a167a 100644 --- a/app/vendor/cakephp/bake/src/View/Helper/DocBlockHelper.php +++ b/app/vendor/cakephp/bake/src/View/Helper/DocBlockHelper.php @@ -13,6 +13,9 @@ */ class DocBlockHelper extends Helper { + /** + * @var bool Whether to add a blank line between different class annotations + */ protected $_annotationSpacing = true; /** @@ -29,14 +32,18 @@ public function classDescription($className, $classType, array $annotations) $lines = []; if ($className && $classType) { $lines[] = "{$className} {$classType}"; - $lines[] = ""; + } + + if ($annotations && $lines) { + $lines[] = ''; } $previous = false; - foreach ($annotations as $ann) { - if (strlen($ann) > 1 && $ann[0] === '@' && strpos($ann, ' ') > 0) { - $type = substr($ann, 0, strpos($ann, ' ')); - if ($this->_annotationSpacing && + foreach ($annotations as $annotation) { + if (strlen($annotation) > 1 && $annotation[0] === '@' && strpos($annotation, ' ') > 0) { + $type = substr($annotation, 0, strpos($annotation, ' ')); + if ( + $this->_annotationSpacing && $previous !== false && $previous !== $type ) { @@ -44,7 +51,7 @@ public function classDescription($className, $classType, array $annotations) } $previous = $type; } - $lines[] = $ann; + $lines[] = $annotation; } $lines = array_merge(["/**"], (new Collection($lines))->map(function ($line) { @@ -63,8 +70,10 @@ public function classDescription($className, $classType, array $annotations) */ public function associatedEntityTypeToHintType($type, Association $association) { - if ($association->type() === Association::MANY_TO_MANY || - $association->type() === Association::ONE_TO_MANY + $annotationType = $association->type(); + if ( + $annotationType === Association::MANY_TO_MANY || + $annotationType === Association::ONE_TO_MANY ) { return $type . '[]'; } @@ -98,7 +107,12 @@ public function buildEntityPropertyHintTypeMap(array $propertySchema) $properties = []; foreach ($propertySchema as $property => $info) { if ($info['kind'] === 'column') { - $properties[$property] = $this->columnTypeToHintType($info['type']); + $type = $this->columnTypeToHintType($info['type']); + if (!empty($info['null'])) { + $type .= '|null'; + } + + $properties[$property] = $type; } } @@ -236,14 +250,14 @@ public function buildTableAnnotations($associations, $associationInfo, $behavior foreach ($assocs as $assoc) { $typeStr = Inflector::camelize($type); $tableFqn = $associationInfo[$assoc['alias']]['targetFqn']; - $annotations[] = "@property {$tableFqn}|\Cake\ORM\Association\\{$typeStr} \${$assoc['alias']}"; + $annotations[] = "@property {$tableFqn}&\Cake\ORM\Association\\{$typeStr} \${$assoc['alias']}"; } } $annotations[] = "@method \\{$namespace}\\Model\\Entity\\{$entity} get(\$primaryKey, \$options = [])"; $annotations[] = "@method \\{$namespace}\\Model\\Entity\\{$entity} newEntity(\$data = null, array \$options = [])"; $annotations[] = "@method \\{$namespace}\\Model\\Entity\\{$entity}[] newEntities(array \$data, array \$options = [])"; - $annotations[] = "@method \\{$namespace}\\Model\\Entity\\{$entity}|bool save(\\Cake\\Datasource\\EntityInterface \$entity, \$options = [])"; - $annotations[] = "@method \\{$namespace}\\Model\\Entity\\{$entity}|bool saveOrFail(\\Cake\\Datasource\\EntityInterface \$entity, \$options = [])"; + $annotations[] = "@method \\{$namespace}\\Model\\Entity\\{$entity}|false save(\\Cake\\Datasource\\EntityInterface \$entity, \$options = [])"; + $annotations[] = "@method \\{$namespace}\\Model\\Entity\\{$entity} saveOrFail(\\Cake\\Datasource\\EntityInterface \$entity, \$options = [])"; $annotations[] = "@method \\{$namespace}\\Model\\Entity\\{$entity} patchEntity(\\Cake\\Datasource\\EntityInterface \$entity, array \$data, array \$options = [])"; $annotations[] = "@method \\{$namespace}\\Model\\Entity\\{$entity}[] patchEntities(\$entities, array \$data, array \$options = [])"; $annotations[] = "@method \\{$namespace}\\Model\\Entity\\{$entity} findOrCreate(\$search, callable \$callback = null, \$options = [])"; diff --git a/app/vendor/cakephp/bake/tests/Fixture/BakeArticlesBakeTagsFixture.php b/app/vendor/cakephp/bake/tests/Fixture/BakeArticlesBakeTagsFixture.php index 00ad9210f..f2ab05cdd 100644 --- a/app/vendor/cakephp/bake/tests/Fixture/BakeArticlesBakeTagsFixture.php +++ b/app/vendor/cakephp/bake/tests/Fixture/BakeArticlesBakeTagsFixture.php @@ -18,7 +18,6 @@ /** * Short description for class. - * */ class BakeArticlesBakeTagsFixture extends TestFixture { @@ -30,7 +29,7 @@ class BakeArticlesBakeTagsFixture extends TestFixture public $fields = [ 'bake_article_id' => ['type' => 'integer', 'null' => false], 'bake_tag_id' => ['type' => 'integer', 'null' => false], - '_constraints' => ['UNIQUE_TAG' => ['type' => 'unique', 'columns' => ['bake_article_id', 'bake_tag_id']]] + '_constraints' => ['UNIQUE_TAG' => ['type' => 'unique', 'columns' => ['bake_article_id', 'bake_tag_id']]], ]; /** diff --git a/app/vendor/cakephp/bake/tests/Fixture/BakeArticlesFixture.php b/app/vendor/cakephp/bake/tests/Fixture/BakeArticlesFixture.php index b3d351cd6..dd758ae81 100644 --- a/app/vendor/cakephp/bake/tests/Fixture/BakeArticlesFixture.php +++ b/app/vendor/cakephp/bake/tests/Fixture/BakeArticlesFixture.php @@ -18,7 +18,6 @@ /** * BakeArticleFixture - * */ class BakeArticlesFixture extends TestFixture { @@ -34,10 +33,10 @@ class BakeArticlesFixture extends TestFixture 'body' => 'text', 'rating' => ['type' => 'float', 'unsigned' => true, 'default' => 0.0, 'null' => false], 'score' => ['type' => 'decimal', 'unsigned' => true, 'default' => 0.0, 'null' => false], - 'published' => ['type' => 'boolean', 'length' => 1, 'default' => false], + 'published' => ['type' => 'boolean', 'length' => 1, 'default' => false, 'null' => false], 'created' => 'datetime', 'updated' => 'datetime', - '_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id']]] + '_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id']]], ]; /** diff --git a/app/vendor/cakephp/bake/tests/Fixture/BakeCarFixture.php b/app/vendor/cakephp/bake/tests/Fixture/BakeCarFixture.php index 730b2f41a..5ec27b45c 100644 --- a/app/vendor/cakephp/bake/tests/Fixture/BakeCarFixture.php +++ b/app/vendor/cakephp/bake/tests/Fixture/BakeCarFixture.php @@ -18,11 +18,9 @@ /** * BakeCarFixture - * */ class BakeCarFixture extends TestFixture { - /** * @var string */ @@ -41,7 +39,7 @@ class BakeCarFixture extends TestFixture 'published' => ['type' => 'boolean', 'length' => 1, 'default' => false], 'created' => 'datetime', 'updated' => 'datetime', - '_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id']]] + '_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id']]], ]; /** diff --git a/app/vendor/cakephp/bake/tests/Fixture/BakeCommentsFixture.php b/app/vendor/cakephp/bake/tests/Fixture/BakeCommentsFixture.php index d5d7119af..69a663d27 100644 --- a/app/vendor/cakephp/bake/tests/Fixture/BakeCommentsFixture.php +++ b/app/vendor/cakephp/bake/tests/Fixture/BakeCommentsFixture.php @@ -18,7 +18,6 @@ /** * BakeCommentFixture fixture for testing bake - * */ class BakeCommentsFixture extends TestFixture { @@ -33,9 +32,9 @@ class BakeCommentsFixture extends TestFixture 'bake_user_id' => ['type' => 'integer', 'null' => false], 'comment' => 'text', 'published' => ['type' => 'string', 'length' => 1, 'default' => 'N'], - 'created' => 'datetime', - 'updated' => 'datetime', - '_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['otherid']]] + 'created' => ['type' => 'datetime', 'length' => null, 'null' => false, 'default' => null, 'comment' => '', 'precision' => null], + 'updated' => ['type' => 'datetime', 'length' => null, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null], + '_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['otherid']]], ]; /** diff --git a/app/vendor/cakephp/bake/tests/Fixture/BakeTagsFixture.php b/app/vendor/cakephp/bake/tests/Fixture/BakeTagsFixture.php index 6dd33d6ee..5f3209277 100644 --- a/app/vendor/cakephp/bake/tests/Fixture/BakeTagsFixture.php +++ b/app/vendor/cakephp/bake/tests/Fixture/BakeTagsFixture.php @@ -18,7 +18,6 @@ /** * Short description for class. - * */ class BakeTagsFixture extends TestFixture { @@ -32,7 +31,7 @@ class BakeTagsFixture extends TestFixture 'tag' => ['type' => 'string', 'null' => false], 'created' => 'datetime', 'updated' => 'datetime', - '_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id']]] + '_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id']]], ]; /** diff --git a/app/vendor/cakephp/bake/tests/Fixture/BakeTemplateAuthorsFixture.php b/app/vendor/cakephp/bake/tests/Fixture/BakeTemplateAuthorsFixture.php index ea68492e7..ef293f24c 100644 --- a/app/vendor/cakephp/bake/tests/Fixture/BakeTemplateAuthorsFixture.php +++ b/app/vendor/cakephp/bake/tests/Fixture/BakeTemplateAuthorsFixture.php @@ -22,7 +22,6 @@ */ class BakeTemplateAuthorsFixture extends TestFixture { - /** * Avoid overriding core.authors * @var string @@ -44,7 +43,7 @@ class BakeTemplateAuthorsFixture extends TestFixture 'account_balance' => ['type' => 'decimal', 'null' => true, 'precision' => 2, 'length' => 12], 'created' => 'datetime', 'modified' => 'datetime', - '_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id']]] + '_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id']]], ]; /** diff --git a/app/vendor/cakephp/bake/tests/Fixture/BakeTemplateProfilesFixture.php b/app/vendor/cakephp/bake/tests/Fixture/BakeTemplateProfilesFixture.php index 0633e9b40..84ae5080b 100644 --- a/app/vendor/cakephp/bake/tests/Fixture/BakeTemplateProfilesFixture.php +++ b/app/vendor/cakephp/bake/tests/Fixture/BakeTemplateProfilesFixture.php @@ -24,7 +24,6 @@ */ class BakeTemplateProfilesFixture extends TestFixture { - /** * @var string */ @@ -40,7 +39,7 @@ class BakeTemplateProfilesFixture extends TestFixture 'author_id' => ['type' => 'integer', 'null' => false], 'nick' => ['type' => 'string', 'null' => false], 'avatar' => ['type' => 'string', 'default' => null], - '_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id']]] + '_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id']]], ]; /** diff --git a/app/vendor/cakephp/bake/tests/Fixture/BakeTemplateRolesFixture.php b/app/vendor/cakephp/bake/tests/Fixture/BakeTemplateRolesFixture.php index 8b486b94e..2a4f5be81 100644 --- a/app/vendor/cakephp/bake/tests/Fixture/BakeTemplateRolesFixture.php +++ b/app/vendor/cakephp/bake/tests/Fixture/BakeTemplateRolesFixture.php @@ -34,7 +34,7 @@ class BakeTemplateRolesFixture extends TestFixture public $fields = [ 'id' => ['type' => 'integer'], 'name' => ['type' => 'string', 'null' => false], - '_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id']]] + '_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id']]], ]; /** diff --git a/app/vendor/cakephp/bake/tests/Fixture/BinaryTestsFixture.php b/app/vendor/cakephp/bake/tests/Fixture/BinaryTestsFixture.php index f0ead760b..092815298 100644 --- a/app/vendor/cakephp/bake/tests/Fixture/BinaryTestsFixture.php +++ b/app/vendor/cakephp/bake/tests/Fixture/BinaryTestsFixture.php @@ -21,7 +21,6 @@ */ class BinaryTestsFixture extends TestFixture { - /** * fields property * @@ -29,8 +28,9 @@ class BinaryTestsFixture extends TestFixture */ public $fields = [ 'id' => ['type' => 'integer'], + 'byte' => ['type' => 'binary', 'length' => 1], 'data' => ['type' => 'binary', 'length' => 300], - '_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id']]] + '_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id']]], ]; /** diff --git a/app/vendor/cakephp/bake/tests/Fixture/CategoriesFixture.php b/app/vendor/cakephp/bake/tests/Fixture/CategoriesFixture.php index ff56bafea..5c95b2b3a 100644 --- a/app/vendor/cakephp/bake/tests/Fixture/CategoriesFixture.php +++ b/app/vendor/cakephp/bake/tests/Fixture/CategoriesFixture.php @@ -18,11 +18,9 @@ /** * CategoriesFixture - * */ class CategoriesFixture extends TestFixture { - /** * Fields * @@ -53,7 +51,7 @@ class CategoriesFixture extends TestFixture [ 'created' => '2015-12-30 18:11:36', 'modified' => '2015-12-30 18:11:36', - 'name' => 'Lorem ipsum dolor sit amet' + 'name' => 'Lorem ipsum dolor sit amet', ], ]; } diff --git a/app/vendor/cakephp/bake/tests/Fixture/CategoriesProductsFixture.php b/app/vendor/cakephp/bake/tests/Fixture/CategoriesProductsFixture.php index ce781ec65..beace82fb 100644 --- a/app/vendor/cakephp/bake/tests/Fixture/CategoriesProductsFixture.php +++ b/app/vendor/cakephp/bake/tests/Fixture/CategoriesProductsFixture.php @@ -18,11 +18,9 @@ /** * CategoriesProductsFixture - * */ class CategoriesProductsFixture extends TestFixture { - /** * Fields * @@ -50,7 +48,7 @@ class CategoriesProductsFixture extends TestFixture public $records = [ [ 'category_id' => 1, - 'product_id' => 1 + 'product_id' => 1, ], ]; } diff --git a/app/vendor/cakephp/bake/tests/Fixture/CategoryThreadsFixture.php b/app/vendor/cakephp/bake/tests/Fixture/CategoryThreadsFixture.php index 9f12e24ff..21ff25181 100644 --- a/app/vendor/cakephp/bake/tests/Fixture/CategoryThreadsFixture.php +++ b/app/vendor/cakephp/bake/tests/Fixture/CategoryThreadsFixture.php @@ -21,7 +21,6 @@ */ class CategoryThreadsFixture extends TestFixture { - /** * fields property * @@ -35,7 +34,7 @@ class CategoryThreadsFixture extends TestFixture 'rght' => ['type' => 'integer', 'unsigned' => true], 'created' => 'datetime', 'updated' => 'datetime', - '_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id']]] + '_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id']]], ]; /** @@ -50,6 +49,6 @@ class CategoryThreadsFixture extends TestFixture ['parent_id' => 3, 'name' => 'Category 1.1.2', 'lft' => 4, 'rght' => 7, 'created' => '2007-03-18 15:30:23', 'updated' => '2007-03-18 15:32:31'], ['parent_id' => 4, 'name' => 'Category 1.1.1.1', 'lft' => 5, 'rght' => 6, 'created' => '2007-03-18 15:30:23', 'updated' => '2007-03-18 15:32:31'], ['parent_id' => 5, 'name' => 'Category 2', 'lft' => 10, 'rght' => 13, 'created' => '2007-03-18 15:30:23', 'updated' => '2007-03-18 15:32:31'], - ['parent_id' => 6, 'name' => 'Category 2.1', 'lft' => 11, 'rght' => 12, 'created' => '2007-03-18 15:30:23', 'updated' => '2007-03-18 15:32:31'] + ['parent_id' => 6, 'name' => 'Category 2.1', 'lft' => 11, 'rght' => 12, 'created' => '2007-03-18 15:30:23', 'updated' => '2007-03-18 15:32:31'], ]; } diff --git a/app/vendor/cakephp/bake/tests/Fixture/DatatypesFixture.php b/app/vendor/cakephp/bake/tests/Fixture/DatatypesFixture.php index 62883c221..620315650 100644 --- a/app/vendor/cakephp/bake/tests/Fixture/DatatypesFixture.php +++ b/app/vendor/cakephp/bake/tests/Fixture/DatatypesFixture.php @@ -21,7 +21,6 @@ */ class DatatypesFixture extends TestFixture { - /** * Fields property * @@ -36,7 +35,7 @@ class DatatypesFixture extends TestFixture 'tiny_int' => ['type' => 'tinyinteger'], 'bool' => ['type' => 'boolean', 'null' => false, 'default' => false], 'uuid' => ['type' => 'uuid'], - '_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id']]] + '_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id']]], ]; /** diff --git a/app/vendor/cakephp/bake/tests/Fixture/InvitationsFixture.php b/app/vendor/cakephp/bake/tests/Fixture/InvitationsFixture.php index 6d0b08841..976fbe0a1 100644 --- a/app/vendor/cakephp/bake/tests/Fixture/InvitationsFixture.php +++ b/app/vendor/cakephp/bake/tests/Fixture/InvitationsFixture.php @@ -18,7 +18,6 @@ /** * InvitationsFixture - * */ class InvitationsFixture extends TestFixture { @@ -50,7 +49,7 @@ class InvitationsFixture extends TestFixture 'update' => 'noAction', 'delete' => 'noAction', ], - ] + ], ]; /** @@ -63,6 +62,6 @@ class InvitationsFixture extends TestFixture 'sender_id' => 1, 'receiver_id' => 1, 'body' => 'Try it out!', - ] + ], ]; } diff --git a/app/vendor/cakephp/bake/tests/Fixture/NumberTreesFixture.php b/app/vendor/cakephp/bake/tests/Fixture/NumberTreesFixture.php index 6070da77e..cd5ffd27a 100644 --- a/app/vendor/cakephp/bake/tests/Fixture/NumberTreesFixture.php +++ b/app/vendor/cakephp/bake/tests/Fixture/NumberTreesFixture.php @@ -23,7 +23,6 @@ */ class NumberTreesFixture extends TestFixture { - /** * fields property * @@ -36,7 +35,7 @@ class NumberTreesFixture extends TestFixture 'lft' => ['type' => 'integer', 'unsigned' => true], 'rght' => ['type' => 'integer', 'unsigned' => true], 'depth' => ['type' => 'integer', 'unsigned' => true], - '_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id']]] + '_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id']]], ]; /** diff --git a/app/vendor/cakephp/bake/tests/Fixture/OldProductsFixture.php b/app/vendor/cakephp/bake/tests/Fixture/OldProductsFixture.php index 068c9ad5f..aa2cda105 100644 --- a/app/vendor/cakephp/bake/tests/Fixture/OldProductsFixture.php +++ b/app/vendor/cakephp/bake/tests/Fixture/OldProductsFixture.php @@ -18,11 +18,9 @@ /** * OldProductsFixture - * */ class OldProductsFixture extends TestFixture { - /** * Fields * @@ -53,7 +51,7 @@ class OldProductsFixture extends TestFixture [ 'created' => '2015-12-30 18:11:36', 'modified' => '2015-12-30 18:11:36', - 'name' => 'Lorem ipsum dolor sit amet' + 'name' => 'Lorem ipsum dolor sit amet', ], ]; } diff --git a/app/vendor/cakephp/bake/tests/Fixture/ProductVersionsFixture.php b/app/vendor/cakephp/bake/tests/Fixture/ProductVersionsFixture.php index 6f480dc26..f2f9b6834 100644 --- a/app/vendor/cakephp/bake/tests/Fixture/ProductVersionsFixture.php +++ b/app/vendor/cakephp/bake/tests/Fixture/ProductVersionsFixture.php @@ -18,11 +18,9 @@ /** * ProductVersionsFixture - * */ class ProductVersionsFixture extends TestFixture { - /** * Fields * @@ -51,7 +49,7 @@ class ProductVersionsFixture extends TestFixture public $records = [ [ 'product_id' => 1, - 'version' => '2015-12-30 18:11:37' + 'version' => '2015-12-30 18:11:37', ], ]; } diff --git a/app/vendor/cakephp/bake/tests/Fixture/ProductsFixture.php b/app/vendor/cakephp/bake/tests/Fixture/ProductsFixture.php index 2076f2119..c701431b9 100644 --- a/app/vendor/cakephp/bake/tests/Fixture/ProductsFixture.php +++ b/app/vendor/cakephp/bake/tests/Fixture/ProductsFixture.php @@ -18,11 +18,9 @@ /** * ProductsFixture - * */ class ProductsFixture extends TestFixture { - /** * Fields * @@ -53,7 +51,7 @@ class ProductsFixture extends TestFixture [ 'created' => '2015-12-30 18:11:37', 'modified' => '2015-12-30 18:11:37', - 'name' => 'Lorem ipsum dolor sit amet' + 'name' => 'Lorem ipsum dolor sit amet', ], ]; } diff --git a/app/vendor/cakephp/bake/tests/bootstrap.php b/app/vendor/cakephp/bake/tests/bootstrap.php index 1d9640033..9c29d1c35 100644 --- a/app/vendor/cakephp/bake/tests/bootstrap.php +++ b/app/vendor/cakephp/bake/tests/bootstrap.php @@ -56,8 +56,4 @@ } ConnectionManager::setConfig('test', ['url' => getenv('db_dsn')]); -Plugin::load('Bake', [ - 'path' => dirname(dirname(__FILE__)) . DS, -]); - -class_alias('PHPUnit\Framework\TestCase', 'PHPUnit_Framework_TestCase'); +Plugin::getCollection()->add(new \Bake\Plugin()); diff --git a/app/vendor/cakephp/cakephp-codesniffer/.editorconfig b/app/vendor/cakephp/cakephp-codesniffer/.editorconfig index 706190175..e43d09569 100644 --- a/app/vendor/cakephp/cakephp-codesniffer/.editorconfig +++ b/app/vendor/cakephp/cakephp-codesniffer/.editorconfig @@ -14,5 +14,4 @@ trim_trailing_whitespace = true end_of_line = crlf [*.yml] -indent_style = space indent_size = 2 diff --git a/app/vendor/cakephp/cakephp-codesniffer/.gitignore b/app/vendor/cakephp/cakephp-codesniffer/.gitignore index a14dfb32d..217b42f4c 100644 --- a/app/vendor/cakephp/cakephp-codesniffer/.gitignore +++ b/app/vendor/cakephp/cakephp-codesniffer/.gitignore @@ -3,3 +3,4 @@ tags composer.lock vendor/ +/.idea/ diff --git a/app/vendor/cakephp/cakephp-codesniffer/.travis.yml b/app/vendor/cakephp/cakephp-codesniffer/.travis.yml index c591d1461..4d2d14b6c 100644 --- a/app/vendor/cakephp/cakephp-codesniffer/.travis.yml +++ b/app/vendor/cakephp/cakephp-codesniffer/.travis.yml @@ -1,29 +1,24 @@ language: php php: - - 7.1 - - 7.0 - - 5.4 - - 5.5 - 5.6 - 7.0 - 7.1 - 7.2 - -sudo: false + - 7.3 + - 7.4snapshot matrix: fast_finish: true include: - - php: 7.1 + - php: 7.2 env: PHPCS=1 - allow_failures: - - php: hhvm +before_install: + - if [[ $TRAVIS_PHP_VERSION != "7.4snapshot" ]]; then phpenv config-rm xdebug.ini; fi before_script: - - composer self-update - composer install --prefer-source script: @@ -34,5 +29,9 @@ script: after_success: - if [[ $PHPCS != 1 && $TRAVIS_PHP_VERSION = 7.1 ]]; then bash <(curl -s https://codecov.io/bash); fi +cache: + directories: + - $HOME/.composer/cache + notifications: email: false diff --git a/app/vendor/cakephp/cakephp-codesniffer/CakePHP/Sniffs/Commenting/DocBlockAlignmentSniff.php b/app/vendor/cakephp/cakephp-codesniffer/CakePHP/Sniffs/Commenting/DocBlockAlignmentSniff.php index 528019c18..799d737c7 100644 --- a/app/vendor/cakephp/cakephp-codesniffer/CakePHP/Sniffs/Commenting/DocBlockAlignmentSniff.php +++ b/app/vendor/cakephp/cakephp-codesniffer/CakePHP/Sniffs/Commenting/DocBlockAlignmentSniff.php @@ -50,7 +50,7 @@ public function process(File $phpcsFile, $stackPtr) if ($fix === true) { // Collect tokens to change indentation of $tokensToIndent = [ - $stackPtr => $codeIndentation + $stackPtr => $codeIndentation, ]; $commentOpenLine = $tokens[$stackPtr]['line']; $commentCloseLine = $tokens[$commentClose]['line']; diff --git a/app/vendor/cakephp/cakephp-codesniffer/CakePHP/Sniffs/Commenting/FunctionCommentSniff.php b/app/vendor/cakephp/cakephp-codesniffer/CakePHP/Sniffs/Commenting/FunctionCommentSniff.php index c1749faf9..d6fe498e9 100644 --- a/app/vendor/cakephp/cakephp-codesniffer/CakePHP/Sniffs/Commenting/FunctionCommentSniff.php +++ b/app/vendor/cakephp/cakephp-codesniffer/CakePHP/Sniffs/Commenting/FunctionCommentSniff.php @@ -62,8 +62,8 @@ protected function isInheritDoc(File $phpcsFile, $stackPtr) $end = $phpcsFile->findNext(T_DOC_COMMENT_CLOSE_TAG, $start); $content = $phpcsFile->getTokensAsString($start, ($end - $start)); - return preg_match('/{@inheritDoc}/i', $content) === 1; - } // end isInheritDoc() + return preg_match('/{@inheritDoc}|@inheritDoc/i', $content) === 1; + } /** * Process the return comment of this function comment. @@ -119,7 +119,7 @@ protected function processReturn(File $phpcsFile, $stackPtr, $commentStart) $phpcsFile->addWarning($error, $tokens[$commentStart]['comment_closer'], 'MissingReturn'); return; - }//end if + } $content = $tokens[($return + 2)]['content']; if (empty($content) === true || $tokens[($return + 2)]['code'] !== T_DOC_COMMENT_STRING) { @@ -172,8 +172,10 @@ protected function processReturn(File $phpcsFile, $stackPtr, $commentStart) continue; } - if ($tokens[$returnToken]['code'] === T_RETURN + if ( + $tokens[$returnToken]['code'] === T_RETURN || $tokens[$returnToken]['code'] === T_YIELD + || $tokens[$returnToken]['code'] === T_YIELD_FROM ) { break; } @@ -195,7 +197,7 @@ protected function processReturn(File $phpcsFile, $stackPtr, $commentStart) // If return type is not void, there needs to be a return statement // somewhere in the function that returns something. if (!in_array('mixed', $typeNames, true) && !in_array('void', $typeNames, true)) { - $returnToken = $phpcsFile->findNext([T_RETURN, T_YIELD], $stackPtr, $endToken); + $returnToken = $phpcsFile->findNext([T_RETURN, T_YIELD, T_YIELD_FROM], $stackPtr, $endToken); if ($returnToken === false) { $error = 'Function return type is not void, but function has no return statement'; $phpcsFile->addWarning($error, $return, 'InvalidNoReturn'); @@ -206,9 +208,8 @@ protected function processReturn(File $phpcsFile, $stackPtr, $commentStart) $phpcsFile->addWarning($error, $returnToken, 'InvalidReturnNotVoid'); } } - }//end if - }//end processReturn() - + } + } /** * Process any throw tags that this function comment has. @@ -258,7 +259,7 @@ protected function processThrows(File $phpcsFile, $stackPtr, $commentStart) } // Starts with a capital letter and ends with a fullstop. - $firstChar = $comment{0}; + $firstChar = $comment[0]; if (strtoupper($firstChar) !== $firstChar) { $error = '@throws tag comment must start with a capital letter'; $phpcsFile->addWarning($error, ($tag + 2), 'ThrowsNotCapital'); @@ -269,10 +270,9 @@ protected function processThrows(File $phpcsFile, $stackPtr, $commentStart) $error = '@throws tag comment must end with a full stop'; $phpcsFile->addWarning($error, ($tag + 2), 'ThrowsNoFullStop'); } - }//end if - }//end foreach - }//end processThrows() - + } + } + } /** * Process the function parameter comments. @@ -354,18 +354,18 @@ protected function processParams(File $phpcsFile, $stackPtr, $commentStart) $error = 'Missing parameter comment'; $phpcsFile->addError($error, $tag, 'MissingParamComment'); $commentLines[] = ['comment' => '']; - }//end if + } } else { $error = 'Missing parameter name'; $phpcsFile->addError($error, $tag, 'MissingParamName'); - }//end if + } } else { $error = 'Missing parameter type'; $phpcsFile->addError($error, $tag, 'MissingParamType'); - }//end if + } $params[] = compact('tag', 'type', 'var', 'comment', 'commentLines', 'typeSpace', 'varSpace'); - }//end foreach + } $realParams = $phpcsFile->getMethodParameters($stackPtr); $foundParams = []; @@ -399,11 +399,13 @@ protected function processParams(File $phpcsFile, $stackPtr, $commentStart) $content .= str_repeat(' ', $param['typeSpace']); $content .= $param['var']; $content .= str_repeat(' ', $param['varSpace']); - $content .= $param['commentLines'][0]['comment']; + if (isset($param['commentLines'][0])) { + $content .= $param['commentLines'][0]['comment']; + } $phpcsFile->fixer->replaceToken(($param['tag'] + 2), $content); } } - }//end foreach + } if ($param['var'] === '') { continue; @@ -441,14 +443,14 @@ protected function processParams(File $phpcsFile, $stackPtr, $commentStart) // We must have an extra parameter comment. $error = 'Superfluous parameter comment'; $phpcsFile->addError($error, $param['tag'], 'ExtraParamComment'); - }//end if + } if ($param['comment'] === '') { continue; } // Param comments must start with a capital letter and end with the full stop. - $firstChar = $param['comment']{0}; + $firstChar = $param['comment'][0]; if (preg_match('|\p{Lu}|u', $firstChar) === 0) { $error = 'Parameter comment must start with a capital letter'; $phpcsFile->addWarning($error, $param['tag'], 'ParamCommentNotCapital'); @@ -459,7 +461,7 @@ protected function processParams(File $phpcsFile, $stackPtr, $commentStart) $error = 'Parameter comment must end with a full stop'; $phpcsFile->addWarning($error, $param['tag'], 'ParamCommentFullStop'); } - }//end foreach + } $realNames = []; foreach ($realParams as $realParam) { @@ -473,5 +475,5 @@ protected function processParams(File $phpcsFile, $stackPtr, $commentStart) $data = [$neededParam]; $phpcsFile->addWarning($error, $commentStart, 'MissingParamTag', $data); } - }//end processParams() -}//end class + } +} diff --git a/app/vendor/cakephp/cakephp-codesniffer/CakePHP/Sniffs/Formatting/BlankLineBeforeReturnSniff.php b/app/vendor/cakephp/cakephp-codesniffer/CakePHP/Sniffs/Formatting/BlankLineBeforeReturnSniff.php index 7fe7e31cc..bebba1c67 100644 --- a/app/vendor/cakephp/cakephp-codesniffer/CakePHP/Sniffs/Formatting/BlankLineBeforeReturnSniff.php +++ b/app/vendor/cakephp/cakephp-codesniffer/CakePHP/Sniffs/Formatting/BlankLineBeforeReturnSniff.php @@ -42,7 +42,8 @@ public function process(File $phpcsFile, $stackPtr) $prevLineTokens = []; while ($current >= 0 && $tokens[$current]['line'] >= $previousLine) { - if ($tokens[$current]['line'] == $previousLine + if ( + $tokens[$current]['line'] == $previousLine && $tokens[$current]['type'] !== 'T_WHITESPACE' && $tokens[$current]['type'] !== 'T_COMMENT' && $tokens[$current]['type'] !== 'T_DOC_COMMENT_OPEN_TAG' @@ -56,7 +57,8 @@ public function process(File $phpcsFile, $stackPtr) $current--; } - if (isset($prevLineTokens[0]) + if ( + isset($prevLineTokens[0]) && ($prevLineTokens[0] === 'T_OPEN_CURLY_BRACKET' || $prevLineTokens[0] === 'T_COLON' || $prevLineTokens[0] === 'T_OPEN_TAG') diff --git a/app/vendor/cakephp/cakephp-codesniffer/CakePHP/Sniffs/Formatting/UseInAlphabeticalOrderSniff.php b/app/vendor/cakephp/cakephp-codesniffer/CakePHP/Sniffs/Formatting/UseInAlphabeticalOrderSniff.php index 5e3020a9c..5e7693460 100644 --- a/app/vendor/cakephp/cakephp-codesniffer/CakePHP/Sniffs/Formatting/UseInAlphabeticalOrderSniff.php +++ b/app/vendor/cakephp/cakephp-codesniffer/CakePHP/Sniffs/Formatting/UseInAlphabeticalOrderSniff.php @@ -18,6 +18,7 @@ use PHP_CodeSniffer\Files\File; use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; /** * Ensures all the use are in alphabetical order. @@ -104,6 +105,16 @@ protected function _checkUseToken($phpcsFile, $stackPtr) $tokens = $phpcsFile->getTokens(); + $scope = 'use'; + $useType = $phpcsFile->findNext(Tokens::$emptyTokens, ($stackPtr + 1), null, true); + if ($useType !== false && $tokens[$useType]['code'] === T_STRING) { + $useContent = strtolower($tokens[$useType]['content']); + if ($useContent === 'function' || $useContent === 'const') { + $scope .= ' ' . $useContent; + $stackPtr = $useType + 1; + } + } + $content = ''; $end = $phpcsFile->findNext([T_SEMICOLON, T_OPEN_CURLY_BRACKET], $stackPtr); $useTokens = array_slice($tokens, $stackPtr, $end - $stackPtr, true); @@ -116,9 +127,8 @@ protected function _checkUseToken($phpcsFile, $stackPtr) // Check for class scoping on use. Traits should be // ordered independently. - $scope = 0; if (!empty($token['conditions'])) { - $scope = key($token['conditions']); + $scope .= key($token['conditions']); } $this->_uses[$scope][$content] = $stackPtr; } diff --git a/app/vendor/cakephp/cakephp-codesniffer/CakePHP/Sniffs/PHP/CommaAfterArrayItemSniff.php b/app/vendor/cakephp/cakephp-codesniffer/CakePHP/Sniffs/PHP/CommaAfterArrayItemSniff.php new file mode 100644 index 000000000..93c3998c9 --- /dev/null +++ b/app/vendor/cakephp/cakephp-codesniffer/CakePHP/Sniffs/PHP/CommaAfterArrayItemSniff.php @@ -0,0 +1,73 @@ += 70300; + + /** + * @inheritDoc + */ + public function register() + { + return [ + T_OPEN_SHORT_ARRAY, + ]; + } + + /** + * @inheritDoc + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + $arrayToken = $tokens[$stackPtr]; + $closeParenthesisPointer = $arrayToken['bracket_closer']; + $openParenthesisToken = $tokens[$arrayToken['bracket_opener']]; + $closeParenthesisToken = $tokens[$closeParenthesisPointer]; + if ($openParenthesisToken['line'] === $closeParenthesisToken['line']) { + return; + } + + $previousToCloseParenthesisPointer = $phpcsFile->findPrevious(Tokens::$emptyTokens, $closeParenthesisPointer - 1, 0, true); + $previousToCloseParenthesisToken = $tokens[$previousToCloseParenthesisPointer]; + if ( + $previousToCloseParenthesisPointer === $arrayToken['bracket_opener'] + || $previousToCloseParenthesisToken['code'] === T_COMMA + || $closeParenthesisToken['line'] === $previousToCloseParenthesisToken['line'] + ) { + return; + } + if (!$this->enableAfterHeredoc && in_array($previousToCloseParenthesisToken['code'], [T_END_HEREDOC, T_END_NOWDOC], true)) { + return; + } + $fix = $phpcsFile->addFixableError( + 'Multi-line arrays must have a trailing comma after the last element.', + $previousToCloseParenthesisPointer, + 'MissingTrailingComma' + ); + if (!$fix) { + return; + } + + $phpcsFile->fixer->beginChangeset(); + $phpcsFile->fixer->addContent($previousToCloseParenthesisPointer, ','); + $phpcsFile->fixer->endChangeset(); + } +} diff --git a/app/vendor/cakephp/cakephp-codesniffer/CakePHP/Sniffs/WhiteSpace/EmptyLinesSniff.php b/app/vendor/cakephp/cakephp-codesniffer/CakePHP/Sniffs/WhiteSpace/EmptyLinesSniff.php index c2eaf78d7..667feed8a 100644 --- a/app/vendor/cakephp/cakephp-codesniffer/CakePHP/Sniffs/WhiteSpace/EmptyLinesSniff.php +++ b/app/vendor/cakephp/cakephp-codesniffer/CakePHP/Sniffs/WhiteSpace/EmptyLinesSniff.php @@ -43,14 +43,17 @@ public function register() public function process(File $phpcsFile, $stackPtr) { $tokens = $phpcsFile->getTokens(); - if ($tokens[$stackPtr]['content'] === $phpcsFile->eolChar - && isset($tokens[($stackPtr + 1)]) === true - && $tokens[($stackPtr + 1)]['content'] === $phpcsFile->eolChar - && isset($tokens[($stackPtr + 2)]) === true - && $tokens[($stackPtr + 2)]['content'] === $phpcsFile->eolChar + // If the current and next two tokens are newlines + // We can remove the next token (the first newline) + if ( + $tokens[$stackPtr]['content'] === $phpcsFile->eolChar + && isset($tokens[$stackPtr + 1]) + && $tokens[$stackPtr + 1]['content'] === $phpcsFile->eolChar + && isset($tokens[$stackPtr + 2]) + && $tokens[$stackPtr + 2]['content'] === $phpcsFile->eolChar ) { $error = 'Found more than a single empty line between content'; - $fix = $phpcsFile->addFixableError($error, ($stackPtr + 3), 'EmptyLines'); + $fix = $phpcsFile->addFixableError($error, $stackPtr + 2, 'EmptyLines'); if ($fix) { $phpcsFile->fixer->replaceToken($stackPtr + 2, ''); } diff --git a/app/vendor/cakephp/cakephp-codesniffer/CakePHP/Sniffs/WhiteSpace/FunctionSpacingSniff.php b/app/vendor/cakephp/cakephp-codesniffer/CakePHP/Sniffs/WhiteSpace/FunctionSpacingSniff.php index f1901b029..75498ab7e 100644 --- a/app/vendor/cakephp/cakephp-codesniffer/CakePHP/Sniffs/WhiteSpace/FunctionSpacingSniff.php +++ b/app/vendor/cakephp/cakephp-codesniffer/CakePHP/Sniffs/WhiteSpace/FunctionSpacingSniff.php @@ -1,28 +1,29 @@ getTokens(); - - /* - Check the number of blank lines - after the function. - */ - if (isset($tokens[$stackPtr]['scope_closer']) === false) { - // Must be an interface method, so the closer is the semi-colon. - $closer = $phpcsFile->findNext(T_SEMICOLON, $stackPtr); - } else { - $closer = $tokens[$stackPtr]['scope_closer']; + $tokens = $phpCsFile->getTokens(); + + $level = $tokens[$stackPointer]['level']; + if ($level < 1) { + return; } - // There needs to be 1 blank lines after the closer. - $nextLineToken = null; - for ($i = $closer; $i < $phpcsFile->numTokens; $i++) { - if (strpos($tokens[$i]['content'], $phpcsFile->eolChar) === false) { - continue; - } else { - $nextLineToken = ($i + 1); - break; + $openingBraceIndex = $phpCsFile->findNext(T_OPEN_CURLY_BRACKET, $stackPointer + 1); + // Fix interface methods + if (!$openingBraceIndex) { + $openingParenthesisIndex = $phpCsFile->findNext(T_OPEN_PARENTHESIS, $stackPointer + 1); + $closingParenthesisIndex = $tokens[$openingParenthesisIndex]['parenthesis_closer']; + + $semicolonIndex = $phpCsFile->findNext(T_SEMICOLON, $closingParenthesisIndex + 1); + + $nextContentIndex = $phpCsFile->findNext(T_WHITESPACE, $semicolonIndex + 1, null, true); + + // Do not mess with the end of the class + if ($tokens[$nextContentIndex]['type'] === 'T_CLOSE_CURLY_BRACKET') { + return; } - } - if ($nextLineToken === null) { - // Never found the next line, which means - // there are 0 blank lines after the function. - $foundLines = 0; - } else { - $nextContent = $phpcsFile->findNext([T_WHITESPACE], ($nextLineToken + 1), null, true); - if ($nextContent === false) { - // We are at the end of the file. That is acceptable as well. - $foundLines = 1; - } else { - $foundLines = ($tokens[$nextContent]['line'] - $tokens[$nextLineToken]['line']); + if ($tokens[$nextContentIndex]['line'] - $tokens[$semicolonIndex]['line'] <= 1) { + $fix = $phpCsFile->addFixableError('Every function/method needs a newline afterwards', $closingParenthesisIndex, 'Abstract'); + if ($fix) { + $phpCsFile->fixer->addNewline($semicolonIndex); + } } + + return; } - /* - Check the number of blank lines - before the function. - */ - - $prevLineToken = null; - for ($i = $stackPtr; $i > 0; $i--) { - if (strpos($tokens[$i]['content'], $phpcsFile->eolChar) === false) { - continue; - } else { - $prevLineToken = $i; - break; + $closingBraceIndex = $tokens[$openingBraceIndex]['scope_closer']; + + // Ignore closures + $nextIndex = $phpCsFile->findNext(Tokens::$emptyTokens, $closingBraceIndex + 1, null, true); + if (in_array($tokens[$nextIndex]['content'], [';', ',', ')'])) { + return; + } + + $nextContentIndex = $phpCsFile->findNext(T_WHITESPACE, $closingBraceIndex + 1, null, true); + + // Do not mess with the end of the class + if ($tokens[$nextContentIndex]['type'] === 'T_CLOSE_CURLY_BRACKET') { + return; + } + + $this->assertNewLineAtTheEnd($phpCsFile, $closingBraceIndex, $nextContentIndex); + $this->assertNewLineAtTheBeginning($phpCsFile, $stackPointer); + } + + /** + * @param \PHP_CodeSniffer\Files\File $phpCsFile File + * @param int $closingBraceIndex Index + * @param int|null $nextContentIndex Index + * + * @return void + */ + protected function assertNewLineAtTheEnd(File $phpCsFile, $closingBraceIndex, $nextContentIndex) + { + $tokens = $phpCsFile->getTokens(); + + if (!$nextContentIndex || $tokens[$nextContentIndex]['line'] - $tokens[$closingBraceIndex]['line'] <= 1) { + $fix = $phpCsFile->addFixableError('Every function/method needs a newline afterwards', $closingBraceIndex, 'Concrete'); + if ($fix) { + $phpCsFile->fixer->addNewline($closingBraceIndex); } } + } - if ($prevLineToken === null) { - // Never found the previous line, which means - // there are 0 blank lines before the function. - $foundLines = 0; - } else { - $prevContent = $phpcsFile->findPrevious([T_WHITESPACE, T_DOC_COMMENT], $prevLineToken, null, true); - - // Before we throw an error, check that we are not throwing an error - // for another function. We don't want to error for no blank lines after - // the previous function and no blank lines before this one as well. - $currentLine = $tokens[$stackPtr]['line']; - $prevLine = ($tokens[$prevContent]['line'] - 1); - $i = ($stackPtr - 1); - $foundLines = 0; - while ($currentLine !== $prevLine && $currentLine > 1 && $i > 0) { - if (isset($tokens[$i]['scope_condition']) === true) { - $scopeCondition = $tokens[$i]['scope_condition']; - if ($tokens[$scopeCondition]['code'] === T_FUNCTION) { - // Found a previous function. - return; - } - } elseif ($tokens[$i]['code'] === T_FUNCTION) { - // Found another interface function. - return; - } + /** + * Asserts newline at the beginning, including the doc block. + * + * @param \PHP_CodeSniffer\Files\File $phpCsFile File + * @param int $stackPointer Stack pointer + * + * @return void + */ + protected function assertNewLineAtTheBeginning(File $phpCsFile, $stackPointer) + { + $tokens = $phpCsFile->getTokens(); - $currentLine = $tokens[$i]['line']; - if ($currentLine === $prevLine) { - break; - } + $line = $tokens[$stackPointer]['line']; + $firstTokenInLineIndex = $stackPointer; + while ($tokens[$firstTokenInLineIndex - 1]['line'] === $line) { + $firstTokenInLineIndex--; + } - if ($tokens[($i - 1)]['line'] < $currentLine && $tokens[($i + 1)]['line'] > $currentLine) { - // This token is on a line by itself. If it is whitespace, the line is empty. - if ($tokens[$i]['code'] === T_WHITESPACE) { - $foundLines++; - } - } - $i--; + $prevContentIndex = $phpCsFile->findPrevious(T_WHITESPACE, $firstTokenInLineIndex - 1, null, true); + if ($tokens[$prevContentIndex]['type'] === 'T_DOC_COMMENT_CLOSE_TAG') { + $firstTokenInLineIndex = $tokens[$prevContentIndex]['comment_opener']; + while ($tokens[$firstTokenInLineIndex - 1]['line'] === $line) { + $firstTokenInLineIndex--; } } + + $prevContentIndex = $phpCsFile->findPrevious(T_WHITESPACE, $firstTokenInLineIndex - 1, null, true); + + // Do not mess with the start of the class + if ($tokens[$prevContentIndex]['type'] === 'T_OPEN_CURLY_BRACKET') { + return; + } + + if ($tokens[$prevContentIndex]['line'] < $tokens[$firstTokenInLineIndex]['line'] - 1) { + return; + } + + $fix = $phpCsFile->addFixableError('Every function/method needs a newline before', $firstTokenInLineIndex, 'Concrete'); + if ($fix) { + $phpCsFile->fixer->addNewline($prevContentIndex); + } } } diff --git a/app/vendor/cakephp/cakephp-codesniffer/CakePHP/Sniffs/WhiteSpace/OperatorSpacingSniff.php b/app/vendor/cakephp/cakephp-codesniffer/CakePHP/Sniffs/WhiteSpace/OperatorSpacingSniff.php index 1aca4e799..8a332c7e5 100644 --- a/app/vendor/cakephp/cakephp-codesniffer/CakePHP/Sniffs/WhiteSpace/OperatorSpacingSniff.php +++ b/app/vendor/cakephp/cakephp-codesniffer/CakePHP/Sniffs/WhiteSpace/OperatorSpacingSniff.php @@ -58,7 +58,8 @@ public function process(File $phpcsFile, $stackPtr) // Skip default values in function declarations. // and declare statements - if ($tokens[$stackPtr]['code'] === T_EQUAL + if ( + $tokens[$stackPtr]['code'] === T_EQUAL || $tokens[$stackPtr]['code'] === T_MINUS ) { if (isset($tokens[$stackPtr]['nested_parenthesis']) === true) { @@ -66,7 +67,8 @@ public function process(File $phpcsFile, $stackPtr) $bracket = array_pop($parenthesis); if (isset($tokens[$bracket]['parenthesis_owner']) === true) { $function = $tokens[$bracket]['parenthesis_owner']; - if ($tokens[$function]['code'] === T_FUNCTION || + if ( + $tokens[$function]['code'] === T_FUNCTION || $tokens[$function]['code'] === T_DECLARE ) { return; diff --git a/app/vendor/cakephp/cakephp-codesniffer/CakePHP/Tests/Commenting/DocBlockAlignmentUnitTest.php b/app/vendor/cakephp/cakephp-codesniffer/CakePHP/Tests/Commenting/DocBlockAlignmentUnitTest.php index 4f214245e..4182292d3 100644 --- a/app/vendor/cakephp/cakephp-codesniffer/CakePHP/Tests/Commenting/DocBlockAlignmentUnitTest.php +++ b/app/vendor/cakephp/cakephp-codesniffer/CakePHP/Tests/Commenting/DocBlockAlignmentUnitTest.php @@ -18,7 +18,7 @@ public function getErrorList($testFile = '') 7 => 1, 14 => 1, 21 => 1, - 30 => 1 + 30 => 1, ]; default: diff --git a/app/vendor/cakephp/cakephp-codesniffer/CakePHP/Tests/Formatting/UseInAlphabeticalOrderUnitTest.3.inc b/app/vendor/cakephp/cakephp-codesniffer/CakePHP/Tests/Formatting/UseInAlphabeticalOrderUnitTest.3.inc new file mode 100644 index 000000000..01ff37c03 --- /dev/null +++ b/app/vendor/cakephp/cakephp-codesniffer/CakePHP/Tests/Formatting/UseInAlphabeticalOrderUnitTest.3.inc @@ -0,0 +1,13 @@ + 1, - 22 => 1, + 8 => 1, + 21 => 1, + 42 => 1, 43 => 1, + 47 => 1, + 48 => 1, + 49 => 1, ]; } diff --git a/app/vendor/cakephp/cakephp-codesniffer/CakePHP/ruleset.xml b/app/vendor/cakephp/cakephp-codesniffer/CakePHP/ruleset.xml index ad0a87c64..02573fc58 100644 --- a/app/vendor/cakephp/cakephp-codesniffer/CakePHP/ruleset.xml +++ b/app/vendor/cakephp/cakephp-codesniffer/CakePHP/ruleset.xml @@ -1,152 +1,181 @@ - CakePHP coding standard - - \.git - */Config/*.ini.php - /*/tmp/ - - - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */config/* - */tests/* - - - */tests/* - - - */tests/* - - - */CakePHP/* - */tests/* - - - */tests/* - - - */tests/* - - - */src/* - */tests/* - - - */src/* - */tests/* - - - */src/* - */tests/* - - - + CakePHP coding standard + + \.git + */Config/*.ini.php + /*/tmp/ + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + + + 0 + + + + + 0 + + + 0 + + + 0 + + + + + 0 + + + + + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */config/* + */tests/* + + + */tests/* + + + */tests/* + + + */CakePHP/* + */tests/* + + + */tests/* + + + */tests/* + + + */src/* + */tests/* + + + */src/* + */tests/* + + + */src/* + */tests/* + + + diff --git a/app/vendor/cakephp/cakephp-codesniffer/LICENSE.txt b/app/vendor/cakephp/cakephp-codesniffer/LICENSE.txt index 5849d31d4..0a0a98c8e 100644 --- a/app/vendor/cakephp/cakephp-codesniffer/LICENSE.txt +++ b/app/vendor/cakephp/cakephp-codesniffer/LICENSE.txt @@ -1,7 +1,7 @@ The MIT License CakePHP(tm) : The Rapid Development PHP Framework (http://cakephp.org) -Copyright (c) 2005-2018, Cake Software Foundation, Inc. +Copyright (c) 2005-present, Cake Software Foundation, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), diff --git a/app/vendor/cakephp/cakephp-codesniffer/README.md b/app/vendor/cakephp/cakephp-codesniffer/README.md index 7de3b6a92..5ef17389e 100644 --- a/app/vendor/cakephp/cakephp-codesniffer/README.md +++ b/app/vendor/cakephp/cakephp-codesniffer/README.md @@ -12,6 +12,15 @@ and checks code against the coding standards used in CakePHP. PSR2 standard. If you want to check against the historical CakePHP coding standard use any of the `1.x` releases. +## Which version should I use? + +| Sniffer version | CakePHP version | PHP min | +| -------- | ------- | ------- | +| 1.x | 2.x | PHP 5.4 | +| 2.x | 3.x | PHP 5.5 | +| 3.x | 3.x | PHP 5.6 | +| 4.x | 4.x | PHP 7.1 | + ## Installation You should install this codesniffer with composer: @@ -24,13 +33,29 @@ you do not overwrite any existing `installed_paths` value. ## Usage +:warning: Warning when these sniffs are installed with composer, ensure that +you have configured the CodeSniffer `installed_paths` setting. + Depending on how you installed the code sniffer changes how you run it. If you have installed phpcs, and this package with PEAR, you can do the following: - vendor/bin/phpcs --standard=CakePHP /path/to/code + vendor/bin/phpcs --colors -p -s --standard=CakePHP /path/to/code -:warning: Warning when these sniffs are installed with composer, ensure that -you have configured the CodeSniffer `installed_paths` setting. +You can also copy the `phpcs.xml.dist` file to your project's root folder as `phpcs.xml`. +This file will import the CakePHP Coding Standard. From there you can edit it to +include/exclude as needed. With this file in place, you can run: + + vendor/bin/phpcs --colors -p -s /path/to/code + +If you are using Composer to manage your CakePHP project, you can also add the below to your composer.json file: + +```json +{ + "scripts": { + "cs-check": "vendor/bin/phpcs --colors -p -s --extensions=ctp,php ./src ./tests" + } +} +``` ## Running Tests diff --git a/app/vendor/cakephp/cakephp-codesniffer/composer.json b/app/vendor/cakephp/cakephp-codesniffer/composer.json index ca4706569..551c0c632 100644 --- a/app/vendor/cakephp/cakephp-codesniffer/composer.json +++ b/app/vendor/cakephp/cakephp-codesniffer/composer.json @@ -3,7 +3,7 @@ "description": "CakePHP CodeSniffer Standards", "type": "phpcodesniffer-standard", "keywords": ["framework", "codesniffer"], - "homepage": "http://cakephp.org", + "homepage": "https://cakephp.org", "license": "MIT", "authors": [ { @@ -13,12 +13,12 @@ ], "support": { "issues": "https://github.com/cakephp/cakephp-codesniffer/issues", - "forum": "http://stackoverflow.com/tags/cakephp", + "forum": "https://stackoverflow.com/tags/cakephp", "irc": "irc://irc.freenode.org/cakephp", "source": "https://github.com/cakephp/cakephp-codesniffer" }, "require": { - "php": ">=5.4", + "php": ">=5.6", "squizlabs/php_codesniffer": "^3.0.0" }, "require-dev": { @@ -26,7 +26,7 @@ }, "autoload": { "psr-4": { - "CakePHP\\": "CakePHP" + "CakePHP\\": "CakePHP/" } }, "scripts": { @@ -48,7 +48,8 @@ "phpunit --coverage-clover=clover.xml", "@reset-ruleset" ], - "cs-check": "phpcs --colors -p --extensions=php --standard=CakePHP ./CakePHP", - "cs-fix": "phpcbf --colors --extensions=php --standard=CakePHP ./CakePHP" + "cs-check": "vendor/bin/phpcs --colors -p -s --extensions=php CakePHP/", + "cs-fix": "vendor/bin/phpcbf --colors -p --extensions=php CakePHP/", + "explain": "vendor/bin/phpcs -e" } } diff --git a/app/vendor/cakephp/cakephp-codesniffer/phpcs.xml b/app/vendor/cakephp/cakephp-codesniffer/phpcs.xml new file mode 100644 index 000000000..ae84391fd --- /dev/null +++ b/app/vendor/cakephp/cakephp-codesniffer/phpcs.xml @@ -0,0 +1,6 @@ + + + CakePHP coding standard + + + diff --git a/app/vendor/cakephp/cakephp-codesniffer/phpcs.xml.dist b/app/vendor/cakephp/cakephp-codesniffer/phpcs.xml.dist new file mode 100644 index 000000000..f3b4f08f2 --- /dev/null +++ b/app/vendor/cakephp/cakephp-codesniffer/phpcs.xml.dist @@ -0,0 +1,6 @@ + + + App Coding Standard + + + diff --git a/app/vendor/cakephp/cakephp-codesniffer/phpunit.xml b/app/vendor/cakephp/cakephp-codesniffer/phpunit.xml index 087d813fc..de25c2672 100644 --- a/app/vendor/cakephp/cakephp-codesniffer/phpunit.xml +++ b/app/vendor/cakephp/cakephp-codesniffer/phpunit.xml @@ -1,8 +1,8 @@ - - ./vendor/squizlabs/php_codesniffer/tests/AllTests.php + + vendor/squizlabs/php_codesniffer/tests/AllTests.php diff --git a/app/vendor/cakephp/cakephp/README.md b/app/vendor/cakephp/cakephp/README.md index 53a03fcfc..cd73d56da 100644 --- a/app/vendor/cakephp/cakephp/README.md +++ b/app/vendor/cakephp/cakephp/README.md @@ -7,9 +7,7 @@ Software License - - Build Status - + Build Status Coverage Status @@ -76,7 +74,7 @@ tests for CakePHP by doing the following: ## Contributing * [CONTRIBUTING.md](.github/CONTRIBUTING.md) - Quick pointers for contributing to the CakePHP project. -* [CookBook "Contributing" Section](https://book.cakephp.org/3.0/en/contributing.html) - Details about contributing to the project. +* [CookBook "Contributing" Section](https://book.cakephp.org/3/en/contributing.html) - Details about contributing to the project. # Security diff --git a/app/vendor/cakephp/cakephp/VERSION.txt b/app/vendor/cakephp/cakephp/VERSION.txt index 496abbcbe..449eae3d1 100644 --- a/app/vendor/cakephp/cakephp/VERSION.txt +++ b/app/vendor/cakephp/cakephp/VERSION.txt @@ -16,4 +16,4 @@ // @license https://opensource.org/licenses/mit-license.php MIT License // +--------------------------------------------------------------------------------------------+ // //////////////////////////////////////////////////////////////////////////////////////////////////// -3.8.3 +3.10.0 diff --git a/app/vendor/cakephp/cakephp/composer.json b/app/vendor/cakephp/cakephp/composer.json index 47e15a564..00ddd6faa 100644 --- a/app/vendor/cakephp/cakephp/composer.json +++ b/app/vendor/cakephp/cakephp/composer.json @@ -28,24 +28,27 @@ "source": "https://github.com/cakephp/cakephp" }, "require": { - "php": ">=5.6.0", + "php": ">=5.6.0,<8.0.0", "ext-intl": "*", "ext-mbstring": "*", "cakephp/chronos": "^1.0.1", "aura/intl": "^3.0.0", + "laminas/laminas-diactoros": "^1.4.0", "psr/log": "^1.0.0", "psr/simple-cache": "^1.0.0", - "zendframework/zend-diactoros": "^1.4.0" + "paragonie/random_compat": "^1.4|^2.0|9.99.99" }, "suggest": { "ext-openssl": "To use Security::encrypt() or have secure CSRF token generation.", "ext-curl": "To enable more efficient network calls in Http\\Client.", - "lib-ICU": "The intl PHP library, to use Text::transliterate() or Text::slug()" + "lib-ICU": "The intl PHP library, to use Text::transliterate() or Text::slug()", + "paragonie/csp-builder": "CSP builder, to use the CSP Middleware" }, "require-dev": { "cakephp/cakephp-codesniffer": "^3.0", "cakephp/chronos": "^1.2.1", - "phpunit/phpunit": "^5.7.14|^6.0" + "phpunit/phpunit": "^5.7.14|^6.0", + "paragonie/csp-builder": "^1.4|^2.3" }, "autoload": { "psr-4": { @@ -98,6 +101,8 @@ "cs-check": "phpcs --colors --parallel=16 -p src/ tests/", "cs-fix": "phpcbf --colors --parallel=16 -p src/ tests/", "test": "phpunit", - "test-coverage": "phpunit --coverage-clover=clover.xml" + "test-coverage": "phpunit --coverage-clover=clover.xml", + "phpstan": "phpstan analyse -c phpstan.neon -l 2 src/", + "phpstan-setup": "cp composer.json composer.backup && composer require --dev phpstan/phpstan-shim:^0.11 --no-update && composer update && mv composer.backup composer.json" } } diff --git a/app/vendor/cakephp/cakephp/config/bootstrap.php b/app/vendor/cakephp/cakephp/config/bootstrap.php index c683c0df2..47b2d402d 100644 --- a/app/vendor/cakephp/cakephp/config/bootstrap.php +++ b/app/vendor/cakephp/cakephp/config/bootstrap.php @@ -12,9 +12,13 @@ * @since 0.2.9 * @license https://opensource.org/licenses/mit-license.php MIT License */ + use Cake\Routing\Router; -define('TIME_START', microtime(true)); +/** + * @var float + */ +define('TIME_START', (float)microtime(true)); require CAKE . 'basics.php'; diff --git a/app/vendor/cakephp/cakephp/config/config.php b/app/vendor/cakephp/cakephp/config/config.php index a7b77b1ad..3a55e79aa 100644 --- a/app/vendor/cakephp/cakephp/config/config.php +++ b/app/vendor/cakephp/cakephp/config/config.php @@ -16,5 +16,5 @@ */ $versionFile = file(CORE_PATH . 'VERSION.txt'); return [ - 'Cake.version' => trim(array_pop($versionFile)) + 'Cake.version' => trim(array_pop($versionFile)), ]; diff --git a/app/vendor/cakephp/cakephp/src/Auth/AbstractPasswordHasher.php b/app/vendor/cakephp/cakephp/src/Auth/AbstractPasswordHasher.php index 3aef37caf..1b1b1922a 100644 --- a/app/vendor/cakephp/cakephp/src/Auth/AbstractPasswordHasher.php +++ b/app/vendor/cakephp/cakephp/src/Auth/AbstractPasswordHasher.php @@ -21,7 +21,6 @@ */ abstract class AbstractPasswordHasher { - use InstanceConfigTrait; /** @@ -46,9 +45,8 @@ public function __construct(array $config = []) /** * Generates password hash. * - * @param string|array $password Plain text password to hash or array of data - * required to generate password hash. - * @return string Password hash + * @param string $password Plain text password to hash. + * @return string|false Either the password hash string or false */ abstract public function hash($password); @@ -56,7 +54,7 @@ abstract public function hash($password); * Check hash. Generate hash from user provided password string or data array * and check against existing hash. * - * @param string|array $password Plain text password to hash or data array. + * @param string $password Plain text password to hash. * @param string $hashedPassword Existing hashed password. * @return bool True if hashes match else false. */ diff --git a/app/vendor/cakephp/cakephp/src/Auth/BaseAuthenticate.php b/app/vendor/cakephp/cakephp/src/Auth/BaseAuthenticate.php index ec2a9ad6c..cbf4f01d5 100644 --- a/app/vendor/cakephp/cakephp/src/Auth/BaseAuthenticate.php +++ b/app/vendor/cakephp/cakephp/src/Auth/BaseAuthenticate.php @@ -48,13 +48,13 @@ abstract class BaseAuthenticate implements EventListenerInterface protected $_defaultConfig = [ 'fields' => [ 'username' => 'username', - 'password' => 'password' + 'password' => 'password', ], 'userModel' => 'Users', 'scope' => [], 'finder' => 'all', 'contain' => null, - 'passwordHasher' => 'Default' + 'passwordHasher' => 'Default', ]; /** @@ -67,7 +67,7 @@ abstract class BaseAuthenticate implements EventListenerInterface /** * Password hasher instance. * - * @var \Cake\Auth\AbstractPasswordHasher + * @var \Cake\Auth\AbstractPasswordHasher|null */ protected $_passwordHasher; @@ -107,13 +107,13 @@ public function __construct(ComponentRegistry $registry, array $config = []) * @param string $username The username/identifier. * @param string|null $password The password, if not provided password checking is skipped * and result of find is returned. - * @return bool|array Either false on failure, or an array of user data. + * @return array|false Either false on failure, or an array of user data. */ protected function _findUser($username, $password = null) { $result = $this->_query($username)->first(); - if (empty($result)) { + if ($result === null) { // Waste time hashing the password, to prevent // timing side-channels. However, don't hash // null passwords as authentication systems @@ -131,6 +131,16 @@ protected function _findUser($username, $password = null) if ($password !== null) { $hasher = $this->passwordHasher(); $hashedPassword = $result->get($passwordField); + + if ($hashedPassword === null || $hashedPassword === '') { + // Waste time hashing the password, to prevent + // timing side-channels to distinguish whether + // user has password or not. + $hasher->hash($password); + + return false; + } + if (!$hasher->check($password, $hashedPassword)) { return false; } @@ -160,7 +170,7 @@ protected function _query($username) $table = $this->getTableLocator()->get($config['userModel']); $options = [ - 'conditions' => [$table->aliasField($config['fields']['username']) => $username] + 'conditions' => [$table->aliasField($config['fields']['username']) => $username], ]; if (!empty($config['scope'])) { @@ -192,7 +202,7 @@ protected function _query($username) */ public function passwordHasher() { - if ($this->_passwordHasher) { + if ($this->_passwordHasher !== null) { return $this->_passwordHasher; } @@ -243,7 +253,7 @@ public function getUser(ServerRequest $request) * * @param \Cake\Http\ServerRequest $request A request object. * @param \Cake\Http\Response $response A response object. - * @return void + * @return \Cake\Http\Response|null|void */ public function unauthenticated(ServerRequest $request, Response $response) { diff --git a/app/vendor/cakephp/cakephp/src/Auth/BasicAuthenticate.php b/app/vendor/cakephp/cakephp/src/Auth/BasicAuthenticate.php index f512e0942..06eb590f6 100644 --- a/app/vendor/cakephp/cakephp/src/Auth/BasicAuthenticate.php +++ b/app/vendor/cakephp/cakephp/src/Auth/BasicAuthenticate.php @@ -47,11 +47,10 @@ * valid credentials are not provided, required authentication headers will be sent * by this authentication provider which triggers the login dialog in the browser/client. * - * @see https://book.cakephp.org/3.0/en/controllers/components/authentication.html + * @see https://book.cakephp.org/3/en/controllers/components/authentication.html */ class BasicAuthenticate extends BaseAuthenticate { - /** * Authenticate a user using HTTP auth. Will use the configured User model and attempt a * login using HTTP auth. @@ -93,23 +92,24 @@ public function getUser(ServerRequest $request) */ public function unauthenticated(ServerRequest $request, Response $response) { - $Exception = new UnauthorizedException(); - $Exception->responseHeader($this->loginHeaders($request)); - throw $Exception; + $unauthorizedException = new UnauthorizedException(); + $unauthorizedException->responseHeader($this->loginHeaders($request)); + + throw $unauthorizedException; } /** * Generate the login headers * * @param \Cake\Http\ServerRequest $request Request object. - * @return array Headers for logging in. + * @return string[] Headers for logging in. */ public function loginHeaders(ServerRequest $request) { $realm = $this->getConfig('realm') ?: $request->getEnv('SERVER_NAME'); return [ - 'WWW-Authenticate' => sprintf('Basic realm="%s"', $realm) + 'WWW-Authenticate' => sprintf('Basic realm="%s"', $realm), ]; } } diff --git a/app/vendor/cakephp/cakephp/src/Auth/ControllerAuthorize.php b/app/vendor/cakephp/cakephp/src/Auth/ControllerAuthorize.php index fc69fab68..ee50651aa 100644 --- a/app/vendor/cakephp/cakephp/src/Auth/ControllerAuthorize.php +++ b/app/vendor/cakephp/cakephp/src/Auth/ControllerAuthorize.php @@ -41,7 +41,6 @@ */ class ControllerAuthorize extends BaseAuthorize { - /** * Controller for the request. * diff --git a/app/vendor/cakephp/cakephp/src/Auth/DefaultPasswordHasher.php b/app/vendor/cakephp/cakephp/src/Auth/DefaultPasswordHasher.php index dc9420cdd..f0fda8b4d 100644 --- a/app/vendor/cakephp/cakephp/src/Auth/DefaultPasswordHasher.php +++ b/app/vendor/cakephp/cakephp/src/Auth/DefaultPasswordHasher.php @@ -19,7 +19,6 @@ */ class DefaultPasswordHasher extends AbstractPasswordHasher { - /** * Default config for this object. * @@ -34,15 +33,15 @@ class DefaultPasswordHasher extends AbstractPasswordHasher */ protected $_defaultConfig = [ 'hashType' => PASSWORD_DEFAULT, - 'hashOptions' => [] + 'hashOptions' => [], ]; /** * Generates password hash. * * @param string $password Plain text password to hash. - * @return bool|string Password hash or false on failure - * @link https://book.cakephp.org/3.0/en/controllers/components/authentication.html#hashing-passwords + * @return string|false Password hash or false on failure + * @link https://book.cakephp.org/3/en/controllers/components/authentication.html#hashing-passwords */ public function hash($password) { diff --git a/app/vendor/cakephp/cakephp/src/Auth/DigestAuthenticate.php b/app/vendor/cakephp/cakephp/src/Auth/DigestAuthenticate.php index 546315b10..dad4eef59 100644 --- a/app/vendor/cakephp/cakephp/src/Auth/DigestAuthenticate.php +++ b/app/vendor/cakephp/cakephp/src/Auth/DigestAuthenticate.php @@ -61,11 +61,10 @@ * `User.password` would store the password hash for use with other methods like * Basic or Form. * - * @see https://book.cakephp.org/3.0/en/controllers/components/authentication.html + * @see https://book.cakephp.org/3/en/controllers/components/authentication.html */ class DigestAuthenticate extends BasicAuthenticate { - /** * Constructor * @@ -213,7 +212,7 @@ public static function password($username, $password, $realm) * Generate the login headers * * @param \Cake\Http\ServerRequest $request Request object. - * @return array Headers for logging in. + * @return string[] Headers for logging in. */ public function loginHeaders(ServerRequest $request) { @@ -223,7 +222,7 @@ public function loginHeaders(ServerRequest $request) 'realm' => $realm, 'qop' => $this->_config['qop'], 'nonce' => $this->generateNonce(), - 'opaque' => $this->_config['opaque'] ?: md5($realm) + 'opaque' => $this->_config['opaque'] ?: md5($realm), ]; $digest = $this->_getDigest($request); @@ -242,7 +241,7 @@ public function loginHeaders(ServerRequest $request) } return [ - 'WWW-Authenticate' => 'Digest ' . implode(',', $opts) + 'WWW-Authenticate' => 'Digest ' . implode(',', $opts), ]; } diff --git a/app/vendor/cakephp/cakephp/src/Auth/FallbackPasswordHasher.php b/app/vendor/cakephp/cakephp/src/Auth/FallbackPasswordHasher.php index 7f7e7cd1b..79ef1119e 100644 --- a/app/vendor/cakephp/cakephp/src/Auth/FallbackPasswordHasher.php +++ b/app/vendor/cakephp/cakephp/src/Auth/FallbackPasswordHasher.php @@ -21,20 +21,19 @@ */ class FallbackPasswordHasher extends AbstractPasswordHasher { - /** * Default config for this object. * * @var array */ protected $_defaultConfig = [ - 'hashers' => [] + 'hashers' => [], ]; /** * Holds the list of password hasher objects that will be used * - * @var array + * @var \Cake\Auth\AbstractPasswordHasher[] */ protected $_hashers = []; @@ -62,7 +61,7 @@ public function __construct(array $config = []) * Uses the first password hasher in the list to generate the hash * * @param string $password Plain text password to hash. - * @return string Password hash + * @return string|false Password hash or false */ public function hash($password) { diff --git a/app/vendor/cakephp/cakephp/src/Auth/FormAuthenticate.php b/app/vendor/cakephp/cakephp/src/Auth/FormAuthenticate.php index a16decd77..268234b25 100644 --- a/app/vendor/cakephp/cakephp/src/Auth/FormAuthenticate.php +++ b/app/vendor/cakephp/cakephp/src/Auth/FormAuthenticate.php @@ -1,6 +1,5 @@ 'Auth.User', - 'redirect' => 'Auth.redirect' + 'redirect' => 'Auth.redirect', ]; /** diff --git a/app/vendor/cakephp/cakephp/src/Auth/Storage/StorageInterface.php b/app/vendor/cakephp/cakephp/src/Auth/Storage/StorageInterface.php index 53c3ebe9e..7895d3e02 100644 --- a/app/vendor/cakephp/cakephp/src/Auth/Storage/StorageInterface.php +++ b/app/vendor/cakephp/cakephp/src/Auth/Storage/StorageInterface.php @@ -17,6 +17,8 @@ /** * Describes the methods that any class representing an Auth data storage should * comply with. + * + * @mixin \Cake\Core\InstanceConfigTrait */ interface StorageInterface { diff --git a/app/vendor/cakephp/cakephp/src/Auth/WeakPasswordHasher.php b/app/vendor/cakephp/cakephp/src/Auth/WeakPasswordHasher.php index a1b54705e..657c95b83 100644 --- a/app/vendor/cakephp/cakephp/src/Auth/WeakPasswordHasher.php +++ b/app/vendor/cakephp/cakephp/src/Auth/WeakPasswordHasher.php @@ -25,14 +25,13 @@ */ class WeakPasswordHasher extends AbstractPasswordHasher { - /** * Default config for this object. * * @var array */ protected $_defaultConfig = [ - 'hashType' => null + 'hashType' => null, ]; /** diff --git a/app/vendor/cakephp/cakephp/src/Cache/Cache.php b/app/vendor/cakephp/cakephp/src/Cache/Cache.php index c4a89e060..c9a326a75 100644 --- a/app/vendor/cakephp/cakephp/src/Cache/Cache.php +++ b/app/vendor/cakephp/cakephp/src/Cache/Cache.php @@ -65,14 +65,13 @@ */ class Cache { - use StaticConfigTrait; /** * An array mapping url schemes to fully qualified caching engine * class names. * - * @var array + * @var string[] */ protected static $_dsnClassMap = [ 'array' => 'Cake\Cache\Engine\ArrayEngine', diff --git a/app/vendor/cakephp/cakephp/src/Cache/CacheEngine.php b/app/vendor/cakephp/cakephp/src/Cache/CacheEngine.php index e1bdc75a0..9d378af5f 100644 --- a/app/vendor/cakephp/cakephp/src/Cache/CacheEngine.php +++ b/app/vendor/cakephp/cakephp/src/Cache/CacheEngine.php @@ -147,7 +147,7 @@ public function readMany($keys) * * @param string $key Identifier for the data * @param int $offset How much to add - * @return bool|int New incremented value, false otherwise + * @return int|false New incremented value, false otherwise */ abstract public function increment($key, $offset = 1); @@ -156,7 +156,7 @@ abstract public function increment($key, $offset = 1); * * @param string $key Identifier for the data * @param int $offset How much to subtract - * @return bool|int New incremented value, false otherwise + * @return int|false New incremented value, false otherwise */ abstract public function decrement($key, $offset = 1); @@ -231,7 +231,7 @@ public function clearGroup($group) * and returns the `group value` for each of them, this is * the token representing each group in the cache key * - * @return array + * @return string[] */ public function groups() { @@ -242,7 +242,7 @@ public function groups() * Generates a safe key for use with cache engine storage engines. * * @param string $key the key passed over - * @return bool|string string key or false + * @return string|false string key or false */ public function key($key) { @@ -264,7 +264,7 @@ public function key($key) * Generates a safe key, taking account of the configured key prefix * * @param string $key the key passed over - * @return mixed string $key or false + * @return string Key * @throws \InvalidArgumentException If key's value is empty */ protected function _key($key) diff --git a/app/vendor/cakephp/cakephp/src/Cache/CacheEngineInterface.php b/app/vendor/cakephp/cakephp/src/Cache/CacheEngineInterface.php index 0b8cac694..b1d4aaa43 100644 --- a/app/vendor/cakephp/cakephp/src/Cache/CacheEngineInterface.php +++ b/app/vendor/cakephp/cakephp/src/Cache/CacheEngineInterface.php @@ -40,7 +40,7 @@ public function add($key, $value); * * @param string $key Identifier for the data * @param int $offset How much to add - * @return bool|int New incremented value, false otherwise + * @return int|false New incremented value, false otherwise */ public function increment($key, $offset = 1); @@ -49,7 +49,7 @@ public function increment($key, $offset = 1); * * @param string $key Identifier for the data * @param int $offset How much to subtract - * @return bool|int New incremented value, false otherwise + * @return int|false New incremented value, false otherwise */ public function decrement($key, $offset = 1); diff --git a/app/vendor/cakephp/cakephp/src/Cache/CacheRegistry.php b/app/vendor/cakephp/cakephp/src/Cache/CacheRegistry.php index 706632f11..0ff82dbc8 100644 --- a/app/vendor/cakephp/cakephp/src/Cache/CacheRegistry.php +++ b/app/vendor/cakephp/cakephp/src/Cache/CacheRegistry.php @@ -23,10 +23,11 @@ * An object registry for cache engines. * * Used by Cake\Cache\Cache to load and manage cache engines. + * + * @extends \Cake\Core\ObjectRegistry<\Cake\Cache\CacheEngine> */ class CacheRegistry extends ObjectRegistry { - /** * Resolve a cache engine classname. * @@ -50,7 +51,7 @@ protected function _resolveClassName($class) * Part of the template method for Cake\Core\ObjectRegistry::load() * * @param string $class The classname that is missing. - * @param string $plugin The plugin the cache is missing in. + * @param string|null $plugin The plugin the cache is missing in. * @return void * @throws \BadMethodCallException */ @@ -94,7 +95,7 @@ protected function _create($class, $alias, $config) } $config = $instance->getConfig(); - if ($config['probability'] && time() % $config['probability'] === 0) { + if (!empty($config['probability']) && time() % $config['probability'] === 0) { $instance->gc(); } @@ -105,10 +106,12 @@ protected function _create($class, $alias, $config) * Remove a single adapter from the registry. * * @param string $name The adapter name. - * @return void + * @return $this */ public function unload($name) { unset($this->_loaded[$name]); + + return $this; } } diff --git a/app/vendor/cakephp/cakephp/src/Cache/Engine/ApcuEngine.php b/app/vendor/cakephp/cakephp/src/Cache/Engine/ApcuEngine.php index c9f4f1de7..c23c68d9b 100644 --- a/app/vendor/cakephp/cakephp/src/Cache/Engine/ApcuEngine.php +++ b/app/vendor/cakephp/cakephp/src/Cache/Engine/ApcuEngine.php @@ -14,7 +14,7 @@ */ namespace Cake\Cache\Engine; -use APCuIterator; +use APCUIterator; use Cake\Cache\CacheEngine; /** @@ -22,7 +22,6 @@ */ class ApcuEngine extends CacheEngine { - /** * Contains the compiled group names * (prefixed with the global configuration prefix) @@ -84,7 +83,7 @@ public function read($key) * * @param string $key Identifier for the data * @param int $offset How much to increment - * @return bool|int New incremented value, false otherwise + * @return int|false New incremented value, false otherwise * @link https://secure.php.net/manual/en/function.apcu-inc.php */ public function increment($key, $offset = 1) @@ -99,7 +98,7 @@ public function increment($key, $offset = 1) * * @param string $key Identifier for the data * @param int $offset How much to subtract - * @return bool|int New decremented value, false otherwise + * @return int|false New decremented value, false otherwise * @link https://secure.php.net/manual/en/function.apcu-dec.php */ public function decrement($key, $offset = 1) @@ -137,8 +136,8 @@ public function clear($check) if ($check) { return true; } - if (class_exists('APCuIterator', false)) { - $iterator = new APCuIterator( + if (class_exists(APCUIterator::class, false)) { + $iterator = new APCUIterator( '/^' . preg_quote($this->_config['prefix'], '/') . '/', APC_ITER_NONE ); @@ -179,7 +178,7 @@ public function add($key, $value) * If the group initial value was not found, then it initializes * the group accordingly. * - * @return array + * @return string[] * @link https://secure.php.net/manual/en/function.apcu-fetch.php * @link https://secure.php.net/manual/en/function.apcu-store.php */ diff --git a/app/vendor/cakephp/cakephp/src/Cache/Engine/ArrayEngine.php b/app/vendor/cakephp/cakephp/src/Cache/Engine/ArrayEngine.php index 3329f443f..0712ff62a 100644 --- a/app/vendor/cakephp/cakephp/src/Cache/Engine/ArrayEngine.php +++ b/app/vendor/cakephp/cakephp/src/Cache/Engine/ArrayEngine.php @@ -84,7 +84,7 @@ public function read($key) * * @param string $key Identifier for the data * @param int $offset How much to increment - * @return bool|int New incremented value, false otherwise + * @return int|false New incremented value, false otherwise */ public function increment($key, $offset = 1) { @@ -102,7 +102,7 @@ public function increment($key, $offset = 1) * * @param string $key Identifier for the data * @param int $offset How much to subtract - * @return bool|int New decremented value, false otherwise + * @return int|false New decremented value, false otherwise */ public function decrement($key, $offset = 1) { @@ -147,7 +147,7 @@ public function clear($check) * If the group initial value was not found, then it initializes * the group accordingly. * - * @return array + * @return string[] */ public function groups() { diff --git a/app/vendor/cakephp/cakephp/src/Cache/Engine/FileEngine.php b/app/vendor/cakephp/cakephp/src/Cache/Engine/FileEngine.php index 108b7ce78..3f03aa013 100644 --- a/app/vendor/cakephp/cakephp/src/Cache/Engine/FileEngine.php +++ b/app/vendor/cakephp/cakephp/src/Cache/Engine/FileEngine.php @@ -33,7 +33,6 @@ */ class FileEngine extends CacheEngine { - /** * Instance of SplFileObject class * @@ -68,7 +67,7 @@ class FileEngine extends CacheEngine 'path' => null, 'prefix' => 'cake_', 'probability' => 100, - 'serialize' => true + 'serialize' => true, ]; /** @@ -278,18 +277,33 @@ public function clear($check) RecursiveIteratorIterator::SELF_FIRST ); $cleared = []; - foreach ($contents as $path) { - if ($path->isFile()) { + /** @var \SplFileInfo $fileInfo */ + foreach ($contents as $fileInfo) { + if ($fileInfo->isFile()) { + unset($fileInfo); + continue; + } + + $realPath = $fileInfo->getRealPath(); + if (!$realPath) { + unset($fileInfo); continue; } - $path = $path->getRealPath() . DIRECTORY_SEPARATOR; + $path = $realPath . DIRECTORY_SEPARATOR; if (!in_array($path, $cleared, true)) { $this->_clearDirectory($path, $now, $threshold); $cleared[] = $path; } + + // possible inner iterators need to be unset too in order for locks on parents to be released + unset($fileInfo); } + // unsetting iterators helps releasing possible locks in certain environments, + // which could otherwise make `rmdir()` fail + unset($directory, $contents); + return true; } @@ -395,7 +409,8 @@ protected function _setKey($key, $createKey = false) if (!$createKey && !$path->isFile()) { return false; } - if (empty($this->_File) || + if ( + empty($this->_File) || $this->_File->getBasename() !== $key || $this->_File->valid() === false ) { @@ -515,6 +530,10 @@ function (SplFileInfo $current) use ($group, $prefix) { @unlink($path); } + // unsetting iterators helps releasing possible locks in certain environments, + // which could otherwise make `rmdir()` fail + unset($directoryIterator, $contents, $filtered); + return true; } } diff --git a/app/vendor/cakephp/cakephp/src/Cache/Engine/MemcachedEngine.php b/app/vendor/cakephp/cakephp/src/Cache/Engine/MemcachedEngine.php index 3943e13a1..6b143c9f5 100644 --- a/app/vendor/cakephp/cakephp/src/Cache/Engine/MemcachedEngine.php +++ b/app/vendor/cakephp/cakephp/src/Cache/Engine/MemcachedEngine.php @@ -29,7 +29,6 @@ */ class MemcachedEngine extends CacheEngine { - /** * memcached wrapper. * @@ -111,7 +110,7 @@ public function init(array $config = []) $this->_serializers = [ 'igbinary' => Memcached::SERIALIZER_IGBINARY, 'json' => Memcached::SERIALIZER_JSON, - 'php' => Memcached::SERIALIZER_PHP + 'php' => Memcached::SERIALIZER_PHP, ]; if (defined('Memcached::HAVE_MSGPACK') && Memcached::HAVE_MSGPACK) { $this->_serializers['msgpack'] = Memcached::SERIALIZER_MSGPACK; @@ -146,7 +145,25 @@ public function init(array $config = []) } $this->_setOptions(); - if (count($this->_Memcached->getServerList())) { + $serverList = $this->_Memcached->getServerList(); + if (count($serverList)) { + if ($this->_config['persistent'] !== false) { + $actualServers = []; + foreach ($serverList as $server) { + $actualServers[] = $server['host'] . ':' . $server['port']; + } + unset($server); + sort($actualServers); + $configuredServers = $this->_config['servers']; + sort($configuredServers); + if ($actualServers !== $configuredServers) { + $message = "Invalid cache configuration. Multiple persistent cache configurations are detected" . + " with different 'servers' values. 'servers' values for persistent cache configurations" . + " must be the same when using the same persistence id."; + throw new InvalidArgumentException($message); + } + } + return true; } @@ -205,7 +222,8 @@ protected function _setOptions() ); } - if ($serializer !== 'php' && + if ( + $serializer !== 'php' && !constant('Memcached::HAVE_' . strtoupper($serializer)) ) { throw new InvalidArgumentException( @@ -219,7 +237,8 @@ protected function _setOptions() ); // Check for Amazon ElastiCache instance - if (defined('Memcached::OPT_CLIENT_MODE') && + if ( + defined('Memcached::OPT_CLIENT_MODE') && defined('Memcached::DYNAMIC_CLIENT_MODE') ) { $this->_Memcached->setOption( @@ -281,7 +300,7 @@ protected function _parseServerString($server) * Read an option value from the memcached connection. * * @param string $name The option name to read. - * @return string|int|null|bool + * @return string|int|bool|null */ public function getOption($name) { @@ -292,20 +311,16 @@ public function getOption($name) * Write data for key into cache. When using memcached as your cache engine * remember that the Memcached pecl extension does not support cache expiry * times greater than 30 days in the future. Any duration greater than 30 days - * will be treated as never expiring. + * will be treated as real Unix time value rather than an offset from current time. * * @param string $key Identifier for the data * @param mixed $value Data to be cached * @return bool True if the data was successfully cached, false on failure - * @see https://secure.php.net/manual/en/memcache.set.php + * @see https://www.php.net/manual/en/memcached.set.php */ public function write($key, $value) { $duration = $this->_config['duration']; - if ($duration > 30 * DAY) { - $duration = 0; - } - $key = $this->_key($key); return $this->_Memcached->set($key, $value, $duration); @@ -378,7 +393,7 @@ public function readMany($keys) * * @param string $key Identifier for the data * @param int $offset How much to increment - * @return bool|int New incremented value, false otherwise + * @return int|false New incremented value, false otherwise */ public function increment($key, $offset = 1) { @@ -392,7 +407,7 @@ public function increment($key, $offset = 1) * * @param string $key Identifier for the data * @param int $offset How much to subtract - * @return bool|int New decremented value, false otherwise + * @return int|false New decremented value, false otherwise */ public function decrement($key, $offset = 1) { @@ -475,10 +490,6 @@ public function clear($check) public function add($key, $value) { $duration = $this->_config['duration']; - if ($duration > 30 * DAY) { - $duration = 0; - } - $key = $this->_key($key); return $this->_Memcached->add($key, $value, $duration); @@ -489,7 +500,7 @@ public function add($key, $value) * If the group initial value was not found, then it initializes * the group accordingly. * - * @return array + * @return string[] */ public function groups() { diff --git a/app/vendor/cakephp/cakephp/src/Cache/Engine/NullEngine.php b/app/vendor/cakephp/cakephp/src/Cache/Engine/NullEngine.php index fee563583..4f6e5e6b4 100644 --- a/app/vendor/cakephp/cakephp/src/Cache/Engine/NullEngine.php +++ b/app/vendor/cakephp/cakephp/src/Cache/Engine/NullEngine.php @@ -23,7 +23,6 @@ */ class NullEngine extends CacheEngine { - /** * {@inheritDoc} */ diff --git a/app/vendor/cakephp/cakephp/src/Cache/Engine/RedisEngine.php b/app/vendor/cakephp/cakephp/src/Cache/Engine/RedisEngine.php index 245db502b..0591b8c40 100644 --- a/app/vendor/cakephp/cakephp/src/Cache/Engine/RedisEngine.php +++ b/app/vendor/cakephp/cakephp/src/Cache/Engine/RedisEngine.php @@ -24,7 +24,6 @@ */ class RedisEngine extends CacheEngine { - /** * Redis wrapper. * @@ -169,7 +168,7 @@ public function read($key) * * @param string $key Identifier for the data * @param int $offset How much to increment - * @return bool|int New incremented value, false otherwise + * @return int|false New incremented value, false otherwise */ public function increment($key, $offset = 1) { @@ -189,7 +188,7 @@ public function increment($key, $offset = 1) * * @param string $key Identifier for the data * @param int $offset How much to subtract - * @return bool|int New decremented value, false otherwise + * @return int|false New decremented value, false otherwise */ public function decrement($key, $offset = 1) { @@ -258,7 +257,7 @@ public function clear($check) * @param string $key Identifier for the data. * @param mixed $value Data to be cached. * @return bool True if the data was successfully cached, false on failure. - * @link https://github.com/phpredis/phpredis#setnx + * @link https://github.com/phpredis/phpredis#set */ public function add($key, $value) { @@ -269,9 +268,8 @@ public function add($key, $value) $value = serialize($value); } - // setNx() doesn't have an expiry option, so follow up with an expiry - if ($this->_Redis->setNx($key, $value)) { - return $this->_Redis->expire($key, $duration); + if ($this->_Redis->set($key, $value, ['nx', 'ex' => $duration])) { + return true; } return false; @@ -282,7 +280,7 @@ public function add($key, $value) * If the group initial value was not found, then it initializes * the group accordingly. * - * @return array + * @return string[] */ public function groups() { diff --git a/app/vendor/cakephp/cakephp/src/Cache/Engine/WincacheEngine.php b/app/vendor/cakephp/cakephp/src/Cache/Engine/WincacheEngine.php index de3206754..51105bbda 100644 --- a/app/vendor/cakephp/cakephp/src/Cache/Engine/WincacheEngine.php +++ b/app/vendor/cakephp/cakephp/src/Cache/Engine/WincacheEngine.php @@ -23,7 +23,6 @@ */ class WincacheEngine extends CacheEngine { - /** * Contains the compiled group names * (prefixed with the global configuration prefix) @@ -85,7 +84,7 @@ public function read($key) * * @param string $key Identifier for the data * @param int $offset How much to increment - * @return bool|int New incremented value, false otherwise + * @return int|false New incremented value, false otherwise */ public function increment($key, $offset = 1) { @@ -99,7 +98,7 @@ public function increment($key, $offset = 1) * * @param string $key Identifier for the data * @param int $offset How much to subtract - * @return bool|int New decremented value, false otherwise + * @return int|false New decremented value, false otherwise */ public function decrement($key, $offset = 1) { @@ -151,7 +150,7 @@ public function clear($check) * If the group initial value was not found, then it initializes * the group accordingly. * - * @return array + * @return string[] */ public function groups() { diff --git a/app/vendor/cakephp/cakephp/src/Cache/Engine/XcacheEngine.php b/app/vendor/cakephp/cakephp/src/Cache/Engine/XcacheEngine.php index 9e1097f31..349907263 100644 --- a/app/vendor/cakephp/cakephp/src/Cache/Engine/XcacheEngine.php +++ b/app/vendor/cakephp/cakephp/src/Cache/Engine/XcacheEngine.php @@ -24,7 +24,6 @@ */ class XcacheEngine extends CacheEngine { - /** * The default config used unless overridden by runtime configuration * @@ -46,7 +45,7 @@ class XcacheEngine extends CacheEngine 'prefix' => null, 'probability' => 100, 'PHP_AUTH_USER' => 'user', - 'PHP_AUTH_PW' => 'password' + 'PHP_AUTH_PW' => 'password', ]; /** @@ -125,7 +124,7 @@ public function read($key) * * @param string $key Identifier for the data * @param int $offset How much to increment - * @return bool|int New incremented value, false otherwise + * @return int|false New incremented value, false otherwise */ public function increment($key, $offset = 1) { @@ -140,7 +139,7 @@ public function increment($key, $offset = 1) * * @param string $key Identifier for the data * @param int $offset How much to subtract - * @return bool|int New decremented value, false otherwise + * @return int|false New decremented value, false otherwise */ public function decrement($key, $offset = 1) { @@ -187,7 +186,7 @@ public function clear($check) * If the group initial value was not found, then it initializes * the group accordingly. * - * @return array + * @return string[] */ public function groups() { diff --git a/app/vendor/cakephp/cakephp/src/Cache/README.md b/app/vendor/cakephp/cakephp/src/Cache/README.md index befe20fe4..14b3905ee 100644 --- a/app/vendor/cakephp/cakephp/src/Cache/README.md +++ b/app/vendor/cakephp/cakephp/src/Cache/README.md @@ -39,7 +39,7 @@ $object = new FileEngine($config); Cache::config('other', $object); ``` -You can now read a write from the cache: +You can now read and write from the cache: ```php $data = Cache::remember('my_cache_key', function () { @@ -52,6 +52,6 @@ the callback will be executed and the returned data will be cached for future ca ## Documentation -Please make sure you check the [official documentation](https://book.cakephp.org/3.0/en/core-libraries/caching.html) +Please make sure you check the [official documentation](https://book.cakephp.org/3/en/core-libraries/caching.html) diff --git a/app/vendor/cakephp/cakephp/src/Cache/SimpleCacheEngine.php b/app/vendor/cakephp/cakephp/src/Cache/SimpleCacheEngine.php index 2654f5be1..80da227c4 100644 --- a/app/vendor/cakephp/cakephp/src/Cache/SimpleCacheEngine.php +++ b/app/vendor/cakephp/cakephp/src/Cache/SimpleCacheEngine.php @@ -100,7 +100,7 @@ public function get($key, $default = null) * * @param string $key The key of the item to store. * @param mixed $value The value of the item to store, must be serializable. - * @param null|int|\DateInterval $ttl Optional. The TTL value of this item. If no value is sent and + * @param \DateInterval|int|null $ttl Optional. The TTL value of this item. If no value is sent and * the driver supports TTL then the library may set a default value * for it or let the driver take care of that. * @return bool True on success and false on failure. @@ -176,7 +176,7 @@ public function getMultiple($keys, $default = null) * Persists a set of key => value pairs in the cache, with an optional TTL. * * @param iterable $values A list of key => value pairs for a multiple-set operation. - * @param null|int|\DateInterval $ttl Optional. The TTL value of this item. If no value is sent and + * @param \DateInterval|int|null $ttl Optional. The TTL value of this item. If no value is sent and * the driver supports TTL then the library may set a default value * for it or let the driver take care of that. * @return bool True on success and false on failure. diff --git a/app/vendor/cakephp/cakephp/src/Cache/composer.json b/app/vendor/cakephp/cakephp/src/Cache/composer.json index 276030307..c417e3638 100644 --- a/app/vendor/cakephp/cakephp/src/Cache/composer.json +++ b/app/vendor/cakephp/cakephp/src/Cache/composer.json @@ -22,7 +22,7 @@ "source": "https://github.com/cakephp/cache" }, "require": { - "php": ">=5.6.0", + "php": ">=5.6.0,<8.0.0", "psr/simple-cache": "^1.0.0", "cakephp/core": "^3.6.0" }, diff --git a/app/vendor/cakephp/cakephp/src/Collection/Collection.php b/app/vendor/cakephp/cakephp/src/Collection/Collection.php index 07aa11f7a..35d3384aa 100644 --- a/app/vendor/cakephp/cakephp/src/Collection/Collection.php +++ b/app/vendor/cakephp/cakephp/src/Collection/Collection.php @@ -26,7 +26,6 @@ */ class Collection extends IteratorIterator implements CollectionInterface, Serializable { - use CollectionTrait; /** diff --git a/app/vendor/cakephp/cakephp/src/Collection/CollectionInterface.php b/app/vendor/cakephp/cakephp/src/Collection/CollectionInterface.php index 1d4019246..3007de752 100644 --- a/app/vendor/cakephp/cakephp/src/Collection/CollectionInterface.php +++ b/app/vendor/cakephp/cakephp/src/Collection/CollectionInterface.php @@ -26,7 +26,6 @@ */ interface CollectionInterface extends Iterator, JsonSerializable { - /** * Executes the passed callable for each of the elements in this collection * and passes both the value and key for them on each step. @@ -42,7 +41,7 @@ interface CollectionInterface extends Iterator, JsonSerializable * * @param callable $c callable function that will receive each of the elements * in this collection - * @return \Cake\Collection\CollectionInterface + * @return $this */ public function each(callable $c); @@ -256,7 +255,7 @@ public function extract($matcher); * @param callable|string $callback the callback or column name to use for sorting * @param int $type the type of comparison to perform, either SORT_STRING * SORT_NUMERIC or SORT_NATURAL - * @see \Cake\Collection\CollectionIterface::sortBy() + * @see \Cake\Collection\CollectionInterface::sortBy() * @return mixed The value of the top element in the collection */ public function max($callback, $type = \SORT_NUMERIC); @@ -762,7 +761,8 @@ public function toArray($preserveKeys = true); public function toList(); /** - * Convert a result set into JSON. + * Returns the data that can be converted to JSON. This returns the same data + * as `toArray()` which contains only unique keys. * * Part of JsonSerializable interface. * @@ -1113,13 +1113,12 @@ public function transpose(); * Calling this method at the same time that you are iterating this collections, for example in * a foreach, will result in undefined behavior. Avoid doing this. * - * * @return int */ public function count(); /** - * Returns the number of unique keys in this iterator. This is, the number of + * Returns the number of unique keys in this iterator. This is the same as the number of * elements the collection will contain after calling `toArray()` * * This method comes with a number of caveats. Please refer to `CollectionInterface::count()` diff --git a/app/vendor/cakephp/cakephp/src/Collection/CollectionTrait.php b/app/vendor/cakephp/cakephp/src/Collection/CollectionTrait.php index fac870082..40cbea86b 100644 --- a/app/vendor/cakephp/cakephp/src/Collection/CollectionTrait.php +++ b/app/vendor/cakephp/cakephp/src/Collection/CollectionTrait.php @@ -39,7 +39,6 @@ */ trait CollectionTrait { - use ExtractTrait; /** @@ -332,7 +331,7 @@ public function sumOf($matcher = null) */ public function shuffle() { - $elements = $this->toArray(); + $elements = $this->toList(); shuffle($elements); return $this->newCollection($elements); @@ -570,7 +569,7 @@ public function combine($keyPath, $valuePath, $groupPath = null) $options = [ 'keyPath' => $this->_propertyExtractor($keyPath), 'valuePath' => $this->_propertyExtractor($valuePath), - 'groupPath' => $groupPath ? $this->_propertyExtractor($groupPath) : null + 'groupPath' => $groupPath ? $this->_propertyExtractor($groupPath) : null, ]; $mapper = function ($value, $key, $mapReduce) use ($options) { @@ -741,7 +740,7 @@ public function listNested($dir = 'desc', $nestingKey = 'children') $modes = [ 'desc' => TreeIterator::SELF_FIRST, 'asc' => TreeIterator::CHILD_FIRST, - 'leaves' => TreeIterator::LEAVES_ONLY + 'leaves' => TreeIterator::LEAVES_ONLY, ]; return new TreeIterator( diff --git a/app/vendor/cakephp/cakephp/src/Collection/ExtractTrait.php b/app/vendor/cakephp/cakephp/src/Collection/ExtractTrait.php index 840135354..5a7db8af5 100644 --- a/app/vendor/cakephp/cakephp/src/Collection/ExtractTrait.php +++ b/app/vendor/cakephp/cakephp/src/Collection/ExtractTrait.php @@ -22,7 +22,6 @@ */ trait ExtractTrait { - /** * Returns a callable that can be used to extract a property or column from * an array or object based on a dot separated path. @@ -71,8 +70,10 @@ protected function _extract($data, $path) continue; } - if ($collectionTransform && - !($data instanceof Traversable || is_array($data))) { + if ( + $collectionTransform && + !($data instanceof Traversable || is_array($data)) + ) { return null; } @@ -122,7 +123,7 @@ protected function _simpleExtract($data, $path) * @param array $conditions A key-value list of conditions to match where the * key is the property path to get from the current item and the value is the * value to be compared the item with. - * @return callable + * @return \Closure */ protected function _createMatcherFilter(array $conditions) { diff --git a/app/vendor/cakephp/cakephp/src/Collection/Iterator/BufferedIterator.php b/app/vendor/cakephp/cakephp/src/Collection/Iterator/BufferedIterator.php index cc7adf0c5..f75c89a98 100644 --- a/app/vendor/cakephp/cakephp/src/Collection/Iterator/BufferedIterator.php +++ b/app/vendor/cakephp/cakephp/src/Collection/Iterator/BufferedIterator.php @@ -25,7 +25,6 @@ */ class BufferedIterator extends Collection implements Countable, Serializable { - /** * The in-memory cache containing results from previous iterators * @@ -140,7 +139,7 @@ public function valid() $this->_key = parent::key(); $this->_buffer->push([ 'key' => $this->_key, - 'value' => $this->_current + 'value' => $this->_current, ]); } @@ -158,6 +157,10 @@ public function next() { $this->_index++; + // Don't move inner iterator if we have more buffer + if ($this->_buffer->offsetExists($this->_index)) { + return; + } if (!$this->_finished) { parent::next(); } diff --git a/app/vendor/cakephp/cakephp/src/Collection/Iterator/ExtractIterator.php b/app/vendor/cakephp/cakephp/src/Collection/Iterator/ExtractIterator.php index 2ffe139b7..76ee05cf4 100644 --- a/app/vendor/cakephp/cakephp/src/Collection/Iterator/ExtractIterator.php +++ b/app/vendor/cakephp/cakephp/src/Collection/Iterator/ExtractIterator.php @@ -24,7 +24,6 @@ */ class ExtractIterator extends Collection { - /** * A callable responsible for extracting a single value for each * item in the collection. @@ -98,6 +97,7 @@ public function unwrap() $callback = $this->_extractor; $res = []; + /** @var \ArrayObject $iterator */ foreach ($iterator->getArrayCopy() as $k => $v) { $res[$k] = $callback($v); } diff --git a/app/vendor/cakephp/cakephp/src/Collection/Iterator/FilterIterator.php b/app/vendor/cakephp/cakephp/src/Collection/Iterator/FilterIterator.php index 2ff534ca4..88c3fe046 100644 --- a/app/vendor/cakephp/cakephp/src/Collection/Iterator/FilterIterator.php +++ b/app/vendor/cakephp/cakephp/src/Collection/Iterator/FilterIterator.php @@ -27,7 +27,6 @@ */ class FilterIterator extends Collection { - /** * The callback used to filter the elements in this collection * diff --git a/app/vendor/cakephp/cakephp/src/Collection/Iterator/InsertIterator.php b/app/vendor/cakephp/cakephp/src/Collection/Iterator/InsertIterator.php index 89411169d..716d5e8c9 100644 --- a/app/vendor/cakephp/cakephp/src/Collection/Iterator/InsertIterator.php +++ b/app/vendor/cakephp/cakephp/src/Collection/Iterator/InsertIterator.php @@ -24,7 +24,6 @@ */ class InsertIterator extends Collection { - /** * The collection from which to extract the values to be inserted * diff --git a/app/vendor/cakephp/cakephp/src/Collection/Iterator/MapReduce.php b/app/vendor/cakephp/cakephp/src/Collection/Iterator/MapReduce.php index c8b6090b2..c2d54fb6f 100644 --- a/app/vendor/cakephp/cakephp/src/Collection/Iterator/MapReduce.php +++ b/app/vendor/cakephp/cakephp/src/Collection/Iterator/MapReduce.php @@ -26,7 +26,6 @@ */ class MapReduce implements IteratorAggregate { - /** * Holds the shuffled results that were emitted from the map * phase @@ -183,6 +182,7 @@ protected function _execute() throw new LogicException('No reducer function was provided'); } + /** @var callable $reducer */ $reducer = $this->_reducer; foreach ($this->_intermediate as $key => $list) { $reducer($list, $key, $this); diff --git a/app/vendor/cakephp/cakephp/src/Collection/Iterator/NestIterator.php b/app/vendor/cakephp/cakephp/src/Collection/Iterator/NestIterator.php index ac9e6cb3b..97cfd4188 100644 --- a/app/vendor/cakephp/cakephp/src/Collection/Iterator/NestIterator.php +++ b/app/vendor/cakephp/cakephp/src/Collection/Iterator/NestIterator.php @@ -24,7 +24,6 @@ */ class NestIterator extends Collection implements RecursiveIterator { - /** * The name of the property that contains the nested items for each element * @@ -48,7 +47,7 @@ public function __construct($items, $nestKey) /** * Returns a traversable containing the children for the current item * - * @return \Traversable + * @return \RecursiveIterator */ public function getChildren() { diff --git a/app/vendor/cakephp/cakephp/src/Collection/Iterator/NoChildrenIterator.php b/app/vendor/cakephp/cakephp/src/Collection/Iterator/NoChildrenIterator.php index aaf1fe6ac..6ac011227 100644 --- a/app/vendor/cakephp/cakephp/src/Collection/Iterator/NoChildrenIterator.php +++ b/app/vendor/cakephp/cakephp/src/Collection/Iterator/NoChildrenIterator.php @@ -24,7 +24,6 @@ */ class NoChildrenIterator extends Collection implements RecursiveIterator { - /** * Returns false as there are no children iterators in this collection * diff --git a/app/vendor/cakephp/cakephp/src/Collection/Iterator/ReplaceIterator.php b/app/vendor/cakephp/cakephp/src/Collection/Iterator/ReplaceIterator.php index ad9840c07..6e5c68d19 100644 --- a/app/vendor/cakephp/cakephp/src/Collection/Iterator/ReplaceIterator.php +++ b/app/vendor/cakephp/cakephp/src/Collection/Iterator/ReplaceIterator.php @@ -24,7 +24,6 @@ */ class ReplaceIterator extends Collection { - /** * The callback function to be used to transform values * diff --git a/app/vendor/cakephp/cakephp/src/Collection/Iterator/SortIterator.php b/app/vendor/cakephp/cakephp/src/Collection/Iterator/SortIterator.php index d9945d35c..163beab7d 100644 --- a/app/vendor/cakephp/cakephp/src/Collection/Iterator/SortIterator.php +++ b/app/vendor/cakephp/cakephp/src/Collection/Iterator/SortIterator.php @@ -39,7 +39,6 @@ */ class SortIterator extends Collection { - /** * Wraps this iterator around the passed items so when iterated they are returned * in order. diff --git a/app/vendor/cakephp/cakephp/src/Collection/Iterator/StoppableIterator.php b/app/vendor/cakephp/cakephp/src/Collection/Iterator/StoppableIterator.php index 7d1882c6c..ef286a77a 100644 --- a/app/vendor/cakephp/cakephp/src/Collection/Iterator/StoppableIterator.php +++ b/app/vendor/cakephp/cakephp/src/Collection/Iterator/StoppableIterator.php @@ -28,7 +28,6 @@ */ class StoppableIterator extends Collection { - /** * The condition to evaluate for each item of the collection * diff --git a/app/vendor/cakephp/cakephp/src/Collection/Iterator/TreeIterator.php b/app/vendor/cakephp/cakephp/src/Collection/Iterator/TreeIterator.php index f4d22516f..7d7e1446b 100644 --- a/app/vendor/cakephp/cakephp/src/Collection/Iterator/TreeIterator.php +++ b/app/vendor/cakephp/cakephp/src/Collection/Iterator/TreeIterator.php @@ -24,7 +24,6 @@ */ class TreeIterator extends RecursiveIteratorIterator { - use CollectionTrait; /** diff --git a/app/vendor/cakephp/cakephp/src/Collection/Iterator/TreePrinter.php b/app/vendor/cakephp/cakephp/src/Collection/Iterator/TreePrinter.php index fa72d0eab..2405e0a9c 100644 --- a/app/vendor/cakephp/cakephp/src/Collection/Iterator/TreePrinter.php +++ b/app/vendor/cakephp/cakephp/src/Collection/Iterator/TreePrinter.php @@ -23,7 +23,6 @@ */ class TreePrinter extends RecursiveIteratorIterator { - use CollectionTrait; /** diff --git a/app/vendor/cakephp/cakephp/src/Collection/Iterator/UnfoldIterator.php b/app/vendor/cakephp/cakephp/src/Collection/Iterator/UnfoldIterator.php index 06a2ca6a6..ccad467d5 100644 --- a/app/vendor/cakephp/cakephp/src/Collection/Iterator/UnfoldIterator.php +++ b/app/vendor/cakephp/cakephp/src/Collection/Iterator/UnfoldIterator.php @@ -26,7 +26,6 @@ */ class UnfoldIterator extends IteratorIterator implements RecursiveIterator { - /** * A function that is passed each element in this iterator and * must return an array or Traversable object. diff --git a/app/vendor/cakephp/cakephp/src/Collection/Iterator/ZipIterator.php b/app/vendor/cakephp/cakephp/src/Collection/Iterator/ZipIterator.php index 9c4adac0a..d638b55b9 100644 --- a/app/vendor/cakephp/cakephp/src/Collection/Iterator/ZipIterator.php +++ b/app/vendor/cakephp/cakephp/src/Collection/Iterator/ZipIterator.php @@ -44,13 +44,12 @@ */ class ZipIterator extends MultipleIterator implements CollectionInterface, Serializable { - use CollectionTrait; /** * The function to use for zipping items together * - * @var callable + * @var callable|null */ protected $_callback; @@ -87,7 +86,7 @@ public function __construct(array $sets, $callable = null) * Returns the value resulting out of zipping all the elements for all the * iterators with the same positional index. * - * @return mixed + * @return array|false */ public function current() { diff --git a/app/vendor/cakephp/cakephp/src/Collection/README.md b/app/vendor/cakephp/cakephp/src/Collection/README.md index 986391317..5c9a03c16 100644 --- a/app/vendor/cakephp/cakephp/src/Collection/README.md +++ b/app/vendor/cakephp/cakephp/src/Collection/README.md @@ -28,4 +28,4 @@ you have in your application as well. ## Documentation -Please make sure you check the [official documentation](https://book.cakephp.org/3.0/en/core-libraries/collections.html) +Please make sure you check the [official documentation](https://book.cakephp.org/3/en/core-libraries/collections.html) diff --git a/app/vendor/cakephp/cakephp/src/Collection/composer.json b/app/vendor/cakephp/cakephp/src/Collection/composer.json index 47a24c47f..f638264ea 100644 --- a/app/vendor/cakephp/cakephp/src/Collection/composer.json +++ b/app/vendor/cakephp/cakephp/src/Collection/composer.json @@ -23,7 +23,7 @@ "source": "https://github.com/cakephp/collection" }, "require": { - "php": ">=5.6.0" + "php": ">=5.6.0,<8.0.0" }, "autoload": { "psr-4": { diff --git a/app/vendor/cakephp/cakephp/src/Command/HelpCommand.php b/app/vendor/cakephp/cakephp/src/Command/HelpCommand.php index d4d7fbbf9..ff7850864 100644 --- a/app/vendor/cakephp/cakephp/src/Command/HelpCommand.php +++ b/app/vendor/cakephp/cakephp/src/Command/HelpCommand.php @@ -134,7 +134,6 @@ protected function asText($io, $commands) /** * @param string[] $names Names - * * @return string|null */ protected function findPrefixedName(array $names) @@ -201,7 +200,7 @@ protected function buildOptionParser(ConsoleOptionParser $parser) 'Get the list of available commands for this application.' )->addOption('xml', [ 'help' => 'Get the listing as XML.', - 'boolean' => true + 'boolean' => true, ]); return $parser; diff --git a/app/vendor/cakephp/cakephp/src/Console/Command.php b/app/vendor/cakephp/cakephp/src/Console/Command.php index 0cd80bc9f..80fe20e0a 100644 --- a/app/vendor/cakephp/cakephp/src/Console/Command.php +++ b/app/vendor/cakephp/cakephp/src/Console/Command.php @@ -19,6 +19,7 @@ use Cake\Datasource\ModelAwareTrait; use Cake\Log\LogTrait; use Cake\ORM\Locator\LocatorAwareTrait; +use Cake\Utility\Inflector; use InvalidArgumentException; use RuntimeException; @@ -102,6 +103,25 @@ public function getName() return $this->name; } + /** + * Get the command name. + * + * Returns the command name based on class name. + * For e.g. for a command with class name `UpdateTableCommand` the default + * name returned would be `'update_table'`. + * + * @return string + */ + public static function defaultName() + { + $pos = strrpos(static::class, '\\'); + /** @psalm-suppress PossiblyFalseOperand */ + $name = substr(static::class, $pos + 1, -7); + $name = Inflector::underscore($name); + + return $name; + } + /** * Get the option parser. * @@ -231,7 +251,7 @@ protected function setOutputLevel(Arguments $args, ConsoleIo $io) * * @param \Cake\Console\Arguments $args The command arguments. * @param \Cake\Console\ConsoleIo $io The console io - * @return null|int The exit code or null for success + * @return int|null The exit code or null for success */ public function execute(Arguments $args, ConsoleIo $io) { diff --git a/app/vendor/cakephp/cakephp/src/Console/CommandCollection.php b/app/vendor/cakephp/cakephp/src/Console/CommandCollection.php index c7e45def4..55dbf2d7e 100644 --- a/app/vendor/cakephp/cakephp/src/Console/CommandCollection.php +++ b/app/vendor/cakephp/cakephp/src/Console/CommandCollection.php @@ -62,7 +62,7 @@ public function add($name, $command) if (!is_subclass_of($command, Shell::class) && !is_subclass_of($command, Command::class)) { $class = is_string($command) ? $command : get_class($command); throw new InvalidArgumentException( - "Cannot use '$class' for command '$name' it is not a subclass of Cake\Console\Shell or Cake\Console\Command." + "Cannot use '$class' for command '$name'. It is not a subclass of Cake\Console\Shell or Cake\Console\Command." ); } if (!preg_match('/^[^\s]+(?:(?: [^\s]+){1,2})?$/ui', $name)) { diff --git a/app/vendor/cakephp/cakephp/src/Console/CommandCollectionAwareInterface.php b/app/vendor/cakephp/cakephp/src/Console/CommandCollectionAwareInterface.php index 89a2ade6e..885b77c50 100644 --- a/app/vendor/cakephp/cakephp/src/Console/CommandCollectionAwareInterface.php +++ b/app/vendor/cakephp/cakephp/src/Console/CommandCollectionAwareInterface.php @@ -17,7 +17,6 @@ /** * An interface for shells that take a CommandCollection * during initialization. - * */ interface CommandCollectionAwareInterface { diff --git a/app/vendor/cakephp/cakephp/src/Console/CommandFactory.php b/app/vendor/cakephp/cakephp/src/Console/CommandFactory.php index 37ca0ccb7..1ae0645e2 100644 --- a/app/vendor/cakephp/cakephp/src/Console/CommandFactory.php +++ b/app/vendor/cakephp/cakephp/src/Console/CommandFactory.php @@ -22,7 +22,6 @@ */ class CommandFactory implements CommandFactoryInterface { - /** * {@inheritDoc} */ diff --git a/app/vendor/cakephp/cakephp/src/Console/CommandRunner.php b/app/vendor/cakephp/cakephp/src/Console/CommandRunner.php index e0ee1022e..fda74cf73 100644 --- a/app/vendor/cakephp/cakephp/src/Console/CommandRunner.php +++ b/app/vendor/cakephp/cakephp/src/Console/CommandRunner.php @@ -123,7 +123,7 @@ public function setAliases(array $aliases) * - Run the requested command. * * @param array $argv The arguments from the CLI environment. - * @param \Cake\Console\ConsoleIo $io The ConsoleIo instance. Used primarily for testing. + * @param \Cake\Console\ConsoleIo|null $io The ConsoleIo instance. Used primarily for testing. * @return int The exit code of the command. * @throws \RuntimeException */ @@ -327,9 +327,8 @@ protected function longestCommandName($commands, $argv) * * @param \Cake\Console\CommandCollection $commands The command collection to check. * @param \Cake\Console\ConsoleIo $io ConsoleIo object for errors. - * @param string $name The name - * @return string The resolved class name - * @throws \RuntimeException + * @param string|null $name The name from the CLI args. + * @return string The resolved name. */ protected function resolveName($commands, $io, $name) { @@ -359,7 +358,7 @@ protected function resolveName($commands, $io, $name) * @param \Cake\Console\Command $command The command to run. * @param array $argv The CLI arguments to invoke. * @param \Cake\Console\ConsoleIo $io The console io - * @return int Exit code + * @return int|null Exit code */ protected function runCommand(Command $command, array $argv, ConsoleIo $io) { @@ -375,7 +374,7 @@ protected function runCommand(Command $command, array $argv, ConsoleIo $io) * * @param \Cake\Console\Shell $shell The shell to run. * @param array $argv The CLI arguments to invoke. - * @return int Exit code + * @return int|bool|null Exit code */ protected function runShell(Shell $shell, array $argv) { @@ -384,7 +383,9 @@ protected function runShell(Shell $shell, array $argv) return $shell->runCommand($argv, true); } catch (StopException $e) { - return $e->getCode(); + $code = $e->getCode(); + + return $code === null ? $code : (int)$code; } } diff --git a/app/vendor/cakephp/cakephp/src/Console/CommandScanner.php b/app/vendor/cakephp/cakephp/src/Console/CommandScanner.php index a19cd8606..7c13b2ec3 100644 --- a/app/vendor/cakephp/cakephp/src/Console/CommandScanner.php +++ b/app/vendor/cakephp/cakephp/src/Console/CommandScanner.php @@ -135,11 +135,14 @@ protected function scanDir($path, $namespace, $prefix, array $hide) continue; } + if (is_subclass_of($class, Command::class)) { + $name = $class::defaultName(); + } $shells[] = [ 'file' => $path . $file, 'fullName' => $prefix . $name, 'name' => $name, - 'class' => $class + 'class' => $class, ]; } diff --git a/app/vendor/cakephp/cakephp/src/Console/ConsoleErrorHandler.php b/app/vendor/cakephp/cakephp/src/Console/ConsoleErrorHandler.php index 798cffa2c..2dc820e51 100644 --- a/app/vendor/cakephp/cakephp/src/Console/ConsoleErrorHandler.php +++ b/app/vendor/cakephp/cakephp/src/Console/ConsoleErrorHandler.php @@ -25,7 +25,6 @@ */ class ConsoleErrorHandler extends BaseErrorHandler { - /** * Standard error stream. * diff --git a/app/vendor/cakephp/cakephp/src/Console/ConsoleInput.php b/app/vendor/cakephp/cakephp/src/Console/ConsoleInput.php index 7f3b2bbab..a71b5fafd 100644 --- a/app/vendor/cakephp/cakephp/src/Console/ConsoleInput.php +++ b/app/vendor/cakephp/cakephp/src/Console/ConsoleInput.php @@ -19,7 +19,6 @@ */ class ConsoleInput { - /** * Input value. * @@ -52,7 +51,7 @@ public function __construct($handle = 'php://stdin') /** * Read a value from the stream * - * @return mixed The value of the stream + * @return string|false The value of the stream */ public function read() { @@ -81,6 +80,6 @@ public function dataAvailable($timeout = 0) $errorFds = null; $readyFds = stream_select($readFds, $writeFds, $errorFds, $timeout); - return ($readyFds > 0); + return $readyFds > 0; } } diff --git a/app/vendor/cakephp/cakephp/src/Console/ConsoleInputArgument.php b/app/vendor/cakephp/cakephp/src/Console/ConsoleInputArgument.php index bc0314dfd..6296dc9be 100644 --- a/app/vendor/cakephp/cakephp/src/Console/ConsoleInputArgument.php +++ b/app/vendor/cakephp/cakephp/src/Console/ConsoleInputArgument.php @@ -25,7 +25,6 @@ */ class ConsoleInputArgument { - /** * Name of the argument. * @@ -50,7 +49,7 @@ class ConsoleInputArgument /** * An array of valid choices for this argument. * - * @var array + * @var string[] */ protected $_choices; @@ -60,7 +59,7 @@ class ConsoleInputArgument * @param string|array $name The long name of the option, or an array with all the properties. * @param string $help The help text for this option * @param bool $required Whether this argument is required. Missing required args will trigger exceptions - * @param array $choices Valid choices for this option. + * @param string[] $choices Valid choices for this option. */ public function __construct($name, $help = '', $required = false, $choices = []) { @@ -153,7 +152,7 @@ public function isRequired() * Check that $value is a valid choice for this argument. * * @param string $value The choice to validate. - * @return bool + * @return true * @throws \Cake\Console\Exception\ConsoleException */ public function validChoice($value) @@ -161,7 +160,7 @@ public function validChoice($value) if (empty($this->_choices)) { return true; } - if (!in_array($value, $this->_choices)) { + if (!in_array($value, $this->_choices, true)) { throw new ConsoleException( sprintf( '"%s" is not a valid value for %s. Please use one of "%s"', diff --git a/app/vendor/cakephp/cakephp/src/Console/ConsoleInputOption.php b/app/vendor/cakephp/cakephp/src/Console/ConsoleInputOption.php index 0a6af94f4..a8ad455f7 100644 --- a/app/vendor/cakephp/cakephp/src/Console/ConsoleInputOption.php +++ b/app/vendor/cakephp/cakephp/src/Console/ConsoleInputOption.php @@ -25,7 +25,6 @@ */ class ConsoleInputOption { - /** * Name of the option * @@ -57,7 +56,7 @@ class ConsoleInputOption /** * Default value for the option * - * @var mixed + * @var string|bool */ protected $_default; @@ -71,7 +70,7 @@ class ConsoleInputOption /** * An array of choices for the option. * - * @var array + * @var string[] */ protected $_choices; @@ -82,7 +81,7 @@ class ConsoleInputOption * @param string $short The short alias for this option * @param string $help The help text for this option * @param bool $boolean Whether this option is a boolean option. Boolean options don't consume extra tokens - * @param string $default The default value for this option. + * @param string|bool $default The default value for this option. * @param string[] $choices Valid choices for this option. * @param bool $multiple Whether this option can accept multiple value definition. * @throws \Cake\Console\Exception\ConsoleException @@ -184,7 +183,7 @@ public function usage() /** * Get the default value for this option * - * @return mixed + * @return string|bool */ public function defaultValue() { @@ -214,8 +213,8 @@ public function acceptsMultiple() /** * Check that a value is a valid choice for this option. * - * @param string $value The choice to validate. - * @return bool + * @param string|bool $value The choice to validate. + * @return true * @throws \Cake\Console\Exception\ConsoleException */ public function validChoice($value) @@ -223,7 +222,7 @@ public function validChoice($value) if (empty($this->_choices)) { return true; } - if (!in_array($value, $this->_choices)) { + if (!in_array($value, $this->_choices, true)) { throw new ConsoleException( sprintf( '"%s" is not a valid value for --%s. Please use one of "%s"', diff --git a/app/vendor/cakephp/cakephp/src/Console/ConsoleInputSubcommand.php b/app/vendor/cakephp/cakephp/src/Console/ConsoleInputSubcommand.php index 1330098c3..078072e80 100644 --- a/app/vendor/cakephp/cakephp/src/Console/ConsoleInputSubcommand.php +++ b/app/vendor/cakephp/cakephp/src/Console/ConsoleInputSubcommand.php @@ -26,7 +26,6 @@ */ class ConsoleInputSubcommand { - /** * Name of the subcommand * @@ -112,7 +111,7 @@ public function help($width = 0) /** * Get the usage value for this option * - * @return \Cake\Console\ConsoleOptionParser|bool Either false or a ConsoleOptionParser + * @return \Cake\Console\ConsoleOptionParser|false Either false or a ConsoleOptionParser */ public function parser() { diff --git a/app/vendor/cakephp/cakephp/src/Console/ConsoleIo.php b/app/vendor/cakephp/cakephp/src/Console/ConsoleIo.php index 77ecf33eb..88a184444 100644 --- a/app/vendor/cakephp/cakephp/src/Console/ConsoleIo.php +++ b/app/vendor/cakephp/cakephp/src/Console/ConsoleIo.php @@ -29,7 +29,6 @@ */ class ConsoleIo { - /** * The output stream * @@ -121,7 +120,7 @@ public function __construct(ConsoleOutput $out = null, ConsoleOutput $err = null /** * Get/set the current output level. * - * @param null|int $level The current output level. + * @param int|null $level The current output level. * @return int The current output level. */ public function level($level = null) @@ -136,7 +135,7 @@ public function level($level = null) /** * Output at the verbose level. * - * @param string|array $message A string or an array of strings to output + * @param string|string[] $message A string or an array of strings to output * @param int $newlines Number of newlines to append * @return int|bool The number of bytes returned from writing to stdout. */ @@ -148,7 +147,7 @@ public function verbose($message, $newlines = 1) /** * Output at all levels. * - * @param string|array $message A string or an array of strings to output + * @param string|string[] $message A string or an array of strings to output * @param int $newlines Number of newlines to append * @return int|bool The number of bytes returned from writing to stdout. */ @@ -168,7 +167,7 @@ public function quiet($message, $newlines = 1) * present in most shells. Using ConsoleIo::QUIET for a message means it will always display. * While using ConsoleIo::VERBOSE means it will only display when verbose output is toggled. * - * @param string|array $message A string or an array of strings to output + * @param string|string[] $message A string or an array of strings to output * @param int $newlines Number of newlines to append * @param int $level The message's output level, see above. * @return int|bool The number of bytes returned from writing to stdout. @@ -187,14 +186,18 @@ public function out($message = '', $newlines = 1, $level = self::NORMAL) /** * Convenience method for out() that wraps message between tag * - * @param string|array|null $message A string or an array of strings to output + * @param string|string[]|null $message A string or an array of strings to output * @param int $newlines Number of newlines to append * @param int $level The message's output level, see above. * @return int|bool The number of bytes returned from writing to stdout. - * @see https://book.cakephp.org/3.0/en/console-and-shells.html#ConsoleIo::out + * @see https://book.cakephp.org/3/en/console-and-shells.html#ConsoleIo::out */ public function info($message = null, $newlines = 1, $level = self::NORMAL) { + if ($message === null) { + deprecationWarning('ConsoleIo::info() in 4.x will not allow null anymore.'); + } + $messageType = 'info'; $message = $this->wrapMessageWithType($messageType, $message); @@ -204,13 +207,17 @@ public function info($message = null, $newlines = 1, $level = self::NORMAL) /** * Convenience method for err() that wraps message between tag * - * @param string|array|null $message A string or an array of strings to output + * @param string|string[]|null $message A string or an array of strings to output * @param int $newlines Number of newlines to append * @return int|bool The number of bytes returned from writing to stderr. - * @see https://book.cakephp.org/3.0/en/console-and-shells.html#ConsoleIo::err + * @see https://book.cakephp.org/3/en/console-and-shells.html#ConsoleIo::err */ public function warning($message = null, $newlines = 1) { + if ($message === null) { + deprecationWarning('ConsoleIo::warning() in 4.x will not allow null anymore.'); + } + $messageType = 'warning'; $message = $this->wrapMessageWithType($messageType, $message); @@ -220,13 +227,17 @@ public function warning($message = null, $newlines = 1) /** * Convenience method for err() that wraps message between tag * - * @param string|array|null $message A string or an array of strings to output + * @param string|string[]|null $message A string or an array of strings to output * @param int $newlines Number of newlines to append * @return int|bool The number of bytes returned from writing to stderr. - * @see https://book.cakephp.org/3.0/en/console-and-shells.html#ConsoleIo::err + * @see https://book.cakephp.org/3/en/console-and-shells.html#ConsoleIo::err */ public function error($message = null, $newlines = 1) { + if ($message === null) { + deprecationWarning('ConsoleIo::error() in 4.x will not allow null anymore.'); + } + $messageType = 'error'; $message = $this->wrapMessageWithType($messageType, $message); @@ -236,20 +247,39 @@ public function error($message = null, $newlines = 1) /** * Convenience method for out() that wraps message between tag * - * @param string|array|null $message A string or an array of strings to output + * @param string|string[]|null $message A string or an array of strings to output * @param int $newlines Number of newlines to append * @param int $level The message's output level, see above. * @return int|bool The number of bytes returned from writing to stdout. - * @see https://book.cakephp.org/3.0/en/console-and-shells.html#ConsoleIo::out + * @see https://book.cakephp.org/3/en/console-and-shells.html#ConsoleIo::out */ public function success($message = null, $newlines = 1, $level = self::NORMAL) { + if ($message === null) { + deprecationWarning('ConsoleIo::success() in 4.x will not allow null anymore.'); + } + $messageType = 'success'; $message = $this->wrapMessageWithType($messageType, $message); return $this->out($message, $newlines, $level); } + /** + * Halts the the current process with a StopException. + * + * @param string $message Error message. + * @param int $code Error code. + * @return void + * @throws \Cake\Console\Exception\StopException + */ + public function abort($message, $code = Command::CODE_ERROR) + { + $this->error($message); + + throw new StopException($message, $code); + } + /** * Wraps a message with a given message type, e.g. * @@ -314,7 +344,7 @@ public function overwrite($message, $newlines = 1, $size = null) * Outputs a single or multiple error messages to stderr. If no parameters * are passed outputs just a newline. * - * @param string|array $message A string or an array of strings to output + * @param string|string[] $message A string or an array of strings to output * @param int $newlines Number of newlines to append * @return int|bool The number of bytes returned from writing to stderr. */ @@ -392,7 +422,7 @@ public function outputAs($mode) * @param string|null $style The style to get or create. * @param array|false|null $definition The array definition of the style to change or create a style * or false to remove a style. - * @return array|null|true If you are getting styles, the style or null will be returned. If you are creating/modifying + * @return array|true|null If you are getting styles, the style or null will be returned. If you are creating/modifying * styles true will be returned. * @see \Cake\Console\ConsoleOutput::styles() */ @@ -492,7 +522,7 @@ public function setLoggers($enable) if ($enable !== static::QUIET) { $stdout = new ConsoleLog([ 'types' => $outLevels, - 'stream' => $this->_out + 'stream' => $this->_out, ]); Log::setConfig('stdout', ['engine' => $stdout]); } diff --git a/app/vendor/cakephp/cakephp/src/Console/ConsoleOptionParser.php b/app/vendor/cakephp/cakephp/src/Console/ConsoleOptionParser.php index b9bd90799..ef541a243 100644 --- a/app/vendor/cakephp/cakephp/src/Console/ConsoleOptionParser.php +++ b/app/vendor/cakephp/cakephp/src/Console/ConsoleOptionParser.php @@ -72,7 +72,6 @@ */ class ConsoleOptionParser { - /** * Description text - displays before options when help is generated * @@ -163,18 +162,18 @@ public function __construct($command = null, $defaultOptions = true) $this->addOption('help', [ 'short' => 'h', 'help' => 'Display this help.', - 'boolean' => true + 'boolean' => true, ]); if ($defaultOptions) { $this->addOption('verbose', [ 'short' => 'v', 'help' => 'Enable verbose output.', - 'boolean' => true + 'boolean' => true, ])->addOption('quiet', [ 'short' => 'q', 'help' => 'Enable quiet output.', - 'boolean' => true + 'boolean' => true, ]); } } @@ -249,7 +248,7 @@ public function toArray() 'options' => $this->_options, 'subcommands' => $this->_subcommands, 'description' => $this->_description, - 'epilog' => $this->_epilog + 'epilog' => $this->_epilog, ]; return $result; @@ -485,7 +484,7 @@ public function addOption($name, array $options = []) 'help' => '', 'default' => null, 'boolean' => false, - 'choices' => [] + 'choices' => [], ]; $options += $defaults; $option = new ConsoleInputOption($options); @@ -542,7 +541,7 @@ public function addArgument($name, array $params = []) 'help' => '', 'index' => count($this->_args), 'required' => false, - 'choices' => [] + 'choices' => [], ]; $options = $params + $defaults; $index = $options['index']; @@ -630,7 +629,7 @@ public function addSubcommand($name, array $options = []) $defaults = [ 'name' => $name, 'help' => '', - 'parser' => null + 'parser' => null, ]; $options += $defaults; @@ -877,7 +876,7 @@ protected function getCommandError($command) $this->rootName, $rootCommand ), - '' + '', ]; if ($bestGuess !== null) { @@ -906,7 +905,7 @@ protected function getOptionError($option) $bestGuess = $this->findClosestItem($option, $availableOptions); $out = [ sprintf('Unknown option `%s`.', $option), - '' + '', ]; if ($bestGuess !== null) { diff --git a/app/vendor/cakephp/cakephp/src/Console/ConsoleOutput.php b/app/vendor/cakephp/cakephp/src/Console/ConsoleOutput.php index f2d09cd34..0ba419066 100644 --- a/app/vendor/cakephp/cakephp/src/Console/ConsoleOutput.php +++ b/app/vendor/cakephp/cakephp/src/Console/ConsoleOutput.php @@ -45,7 +45,6 @@ */ class ConsoleOutput { - /** * Raw output constant - no modification of output text. * @@ -82,8 +81,9 @@ class ConsoleOutput protected $_output; /** - * The current output type. Manipulated with ConsoleOutput::outputAs(); + * The current output type. * + * @see setOutputAs() For manipulation. * @var int */ protected $_outputAs = self::COLOR; @@ -101,7 +101,7 @@ class ConsoleOutput 'blue' => 34, 'magenta' => 35, 'cyan' => 36, - 'white' => 37 + 'white' => 37, ]; /** @@ -117,7 +117,7 @@ class ConsoleOutput 'blue' => 44, 'magenta' => 45, 'cyan' => 46, - 'white' => 47 + 'white' => 47, ]; /** @@ -149,7 +149,7 @@ class ConsoleOutput 'success' => ['text' => 'green'], 'comment' => ['text' => 'blue'], 'question' => ['text' => 'magenta'], - 'notice' => ['text' => 'cyan'] + 'notice' => ['text' => 'cyan'], ]; /** @@ -164,7 +164,8 @@ public function __construct($stream = 'php://stdout') { $this->_output = fopen($stream, 'wb'); - if ((DIRECTORY_SEPARATOR === '\\' && !(bool)env('ANSICON') && env('ConEmuANSI') !== 'ON') || + if ( + (DIRECTORY_SEPARATOR === '\\' && !(bool)env('ANSICON') && env('ConEmuANSI') !== 'ON') || (function_exists('posix_isatty') && !posix_isatty($this->_output)) ) { $this->_outputAs = self::PLAIN; @@ -175,7 +176,7 @@ public function __construct($stream = 'php://stdout') * Outputs a single or multiple messages to stdout or stderr. If no parameters * are passed, outputs just a newline. * - * @param string|array $message A string or an array of strings to output + * @param string|string[] $message A string or an array of strings to output * @param int $newlines Number of newlines to append * @return int|bool The number of bytes returned from writing to output. */ diff --git a/app/vendor/cakephp/cakephp/src/Console/Exception/ConsoleException.php b/app/vendor/cakephp/cakephp/src/Console/Exception/ConsoleException.php index 4af7906bb..008c297d3 100644 --- a/app/vendor/cakephp/cakephp/src/Console/Exception/ConsoleException.php +++ b/app/vendor/cakephp/cakephp/src/Console/Exception/ConsoleException.php @@ -7,7 +7,7 @@ * Redistributions of files must retain the above copyright notice. * * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) - * @link https://book.cakephp.org/3.0/en/development/errors.html#error-exception-configuration + * @link https://book.cakephp.org/3/en/development/errors.html#error-exception-configuration * @since 3.0.0 * @license https://opensource.org/licenses/mit-license.php MIT License */ diff --git a/app/vendor/cakephp/cakephp/src/Console/Exception/MissingHelperException.php b/app/vendor/cakephp/cakephp/src/Console/Exception/MissingHelperException.php index e2530a8c5..221ff749f 100644 --- a/app/vendor/cakephp/cakephp/src/Console/Exception/MissingHelperException.php +++ b/app/vendor/cakephp/cakephp/src/Console/Exception/MissingHelperException.php @@ -17,5 +17,8 @@ */ class MissingHelperException extends ConsoleException { + /** + * @inheritDoc + */ protected $_messageTemplate = 'Helper class %s could not be found.'; } diff --git a/app/vendor/cakephp/cakephp/src/Console/Exception/MissingShellException.php b/app/vendor/cakephp/cakephp/src/Console/Exception/MissingShellException.php index be628ec81..86724422b 100644 --- a/app/vendor/cakephp/cakephp/src/Console/Exception/MissingShellException.php +++ b/app/vendor/cakephp/cakephp/src/Console/Exception/MissingShellException.php @@ -17,6 +17,8 @@ */ class MissingShellException extends ConsoleException { - + /** + * @inheritDoc + */ protected $_messageTemplate = 'Shell class for "%s" could not be found. If you are trying to use a plugin shell, that was loaded via $this->addPlugin(), you may need to update bin/cake.php to match https://github.com/cakephp/app/tree/master/bin/cake.php'; } diff --git a/app/vendor/cakephp/cakephp/src/Console/Exception/MissingShellMethodException.php b/app/vendor/cakephp/cakephp/src/Console/Exception/MissingShellMethodException.php index 50ebeb322..09198a654 100644 --- a/app/vendor/cakephp/cakephp/src/Console/Exception/MissingShellMethodException.php +++ b/app/vendor/cakephp/cakephp/src/Console/Exception/MissingShellMethodException.php @@ -17,6 +17,8 @@ */ class MissingShellMethodException extends ConsoleException { - + /** + * @inheritDoc + */ protected $_messageTemplate = "Unknown command %1\$s %2\$s.\nFor usage try `cake %1\$s --help`"; } diff --git a/app/vendor/cakephp/cakephp/src/Console/Exception/MissingTaskException.php b/app/vendor/cakephp/cakephp/src/Console/Exception/MissingTaskException.php index 8dc49b7f7..4938fb5a5 100644 --- a/app/vendor/cakephp/cakephp/src/Console/Exception/MissingTaskException.php +++ b/app/vendor/cakephp/cakephp/src/Console/Exception/MissingTaskException.php @@ -17,5 +17,8 @@ */ class MissingTaskException extends ConsoleException { + /** + * @inheritDoc + */ protected $_messageTemplate = 'Task class %s could not be found.'; } diff --git a/app/vendor/cakephp/cakephp/src/Console/Exception/StopException.php b/app/vendor/cakephp/cakephp/src/Console/Exception/StopException.php index 884ccf0cc..7ee61c7e3 100644 --- a/app/vendor/cakephp/cakephp/src/Console/Exception/StopException.php +++ b/app/vendor/cakephp/cakephp/src/Console/Exception/StopException.php @@ -7,7 +7,7 @@ * Redistributions of files must retain the above copyright notice. * * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) - * @link https://book.cakephp.org/3.0/en/development/errors.html#error-exception-configuration + * @link https://book.cakephp.org/3/en/development/errors.html#error-exception-configuration * @since 3.2.0 * @license https://opensource.org/licenses/mit-license.php MIT License */ diff --git a/app/vendor/cakephp/cakephp/src/Console/HelpFormatter.php b/app/vendor/cakephp/cakephp/src/Console/HelpFormatter.php index faeff5eea..7d7021c7b 100644 --- a/app/vendor/cakephp/cakephp/src/Console/HelpFormatter.php +++ b/app/vendor/cakephp/cakephp/src/Console/HelpFormatter.php @@ -29,7 +29,6 @@ */ class HelpFormatter { - /** * The maximum number of arguments shown when generating usage. * @@ -111,7 +110,7 @@ public function text($width = 72) $out[] = Text::wrapBlock($command->help($max), [ 'width' => $width, 'indent' => str_repeat(' ', $max), - 'indentAt' => 1 + 'indentAt' => 1, ]); } $out[] = ''; @@ -128,7 +127,7 @@ public function text($width = 72) $out[] = Text::wrapBlock($option->help($max), [ 'width' => $width, 'indent' => str_repeat(' ', $max), - 'indentAt' => 1 + 'indentAt' => 1, ]); } $out[] = ''; @@ -143,7 +142,7 @@ public function text($width = 72) $out[] = Text::wrapBlock($argument->help($max), [ 'width' => $width, 'indent' => str_repeat(' ', $max), - 'indentAt' => 1 + 'indentAt' => 1, ]); } $out[] = ''; diff --git a/app/vendor/cakephp/cakephp/src/Console/HelperRegistry.php b/app/vendor/cakephp/cakephp/src/Console/HelperRegistry.php index c832d8ab7..e20ed683d 100644 --- a/app/vendor/cakephp/cakephp/src/Console/HelperRegistry.php +++ b/app/vendor/cakephp/cakephp/src/Console/HelperRegistry.php @@ -21,10 +21,11 @@ /** * Registry for Helpers. Provides features * for lazily loading helpers. + * + * @extends \Cake\Core\ObjectRegistry<\Cake\Console\Helper> */ class HelperRegistry extends ObjectRegistry { - /** * Shell to use to set params to tasks. * @@ -71,7 +72,7 @@ protected function _resolveClassName($class) * and Cake\Core\ObjectRegistry::unload() * * @param string $class The classname that is missing. - * @param string $plugin The plugin the helper is missing in. + * @param string|null $plugin The plugin the helper is missing in. * @return void * @throws \Cake\Console\Exception\MissingHelperException */ @@ -79,7 +80,7 @@ protected function _throwMissingClassError($class, $plugin) { throw new MissingHelperException([ 'class' => $class, - 'plugin' => $plugin + 'plugin' => $plugin, ]); } diff --git a/app/vendor/cakephp/cakephp/src/Console/Shell.php b/app/vendor/cakephp/cakephp/src/Console/Shell.php index df8024bde..d910d09e0 100644 --- a/app/vendor/cakephp/cakephp/src/Console/Shell.php +++ b/app/vendor/cakephp/cakephp/src/Console/Shell.php @@ -38,7 +38,6 @@ */ class Shell { - use LocatorAwareTrait; use LogTrait; use MergeVariablesTrait; @@ -133,7 +132,7 @@ class Shell * Contains tasks to load and instantiate * * @var array|bool - * @link https://book.cakephp.org/3.0/en/console-and-shells.html#Shell::$tasks + * @link https://book.cakephp.org/3/en/console-and-shells.html#Shell::$tasks */ public $tasks = []; @@ -177,7 +176,7 @@ class Shell * * @param \Cake\Console\ConsoleIo|null $io An io instance. * @param \Cake\ORM\Locator\LocatorInterface|null $locator Table locator instance. - * @link https://book.cakephp.org/3.0/en/console-and-shells.html#Shell + * @link https://book.cakephp.org/3/en/console-and-shells.html#Shell */ public function __construct(ConsoleIo $io = null, LocatorInterface $locator = null) { @@ -261,7 +260,7 @@ public function io(ConsoleIo $io = null) * allows configuration of tasks prior to shell execution * * @return void - * @link https://book.cakephp.org/3.0/en/console-and-shells.html#Cake\Console\ConsoleOptionParser::initialize + * @link https://book.cakephp.org/3/en/console-and-shells.html#Cake\Console\ConsoleOptionParser::initialize */ public function initialize() { @@ -276,7 +275,7 @@ public function initialize() * or otherwise modify the pre-command flow. * * @return void - * @link https://book.cakephp.org/3.0/en/console-and-shells.html#Cake\Console\ConsoleOptionParser::startup + * @link https://book.cakephp.org/3/en/console-and-shells.html#Cake\Console\ConsoleOptionParser::startup */ public function startup() { @@ -336,7 +335,7 @@ protected function _validateTasks() * * @param string $task The task name to check. * @return bool Success - * @link https://book.cakephp.org/3.0/en/console-and-shells.html#shell-tasks + * @link https://book.cakephp.org/3/en/console-and-shells.html#shell-tasks */ public function hasTask($task) { @@ -348,7 +347,7 @@ public function hasTask($task) * * @param string $name The method name to check. * @return bool - * @link https://book.cakephp.org/3.0/en/console-and-shells.html#shell-tasks + * @link https://book.cakephp.org/3/en/console-and-shells.html#shell-tasks */ public function hasMethod($name) { @@ -404,7 +403,7 @@ public function hasMethod($name) * ]);` * * @return int The cli command exit code. 0 is success. - * @link https://book.cakephp.org/3.0/en/console-and-shells.html#invoking-other-shells-from-your-shell + * @link https://book.cakephp.org/3/en/console-and-shells.html#invoking-other-shells-from-your-shell */ public function dispatchShell() { @@ -478,7 +477,7 @@ public function parseDispatchArguments($args) * Built-in extra parameter is : * - `requested` : if used, will prevent the Shell welcome message to be displayed * @return int|bool|null - * @link https://book.cakephp.org/3.0/en/console-and-shells.html#the-cakephp-console + * @link https://book.cakephp.org/3/en/console-and-shells.html#the-cakephp-console */ public function runCommand($argv, $autoMethod = false, $extra = []) { @@ -587,7 +586,7 @@ protected function _displayHelp($command) * By overriding this method you can configure the ConsoleOptionParser before returning it. * * @return \Cake\Console\ConsoleOptionParser - * @link https://book.cakephp.org/3.0/en/console-and-shells.html#configuring-options-and-generating-help + * @link https://book.cakephp.org/3/en/console-and-shells.html#configuring-options-and-generating-help */ public function getOptionParser() { @@ -640,7 +639,7 @@ public function param($name) * @param string|array|null $options Array or string of options. * @param string|null $default Default input value. * @return string|null Either the default value, or the user-provided input. - * @link https://book.cakephp.org/3.0/en/console-and-shells.html#Shell::in + * @link https://book.cakephp.org/3/en/console-and-shells.html#Shell::in */ public function in($prompt, $options = null, $default = null) { @@ -668,7 +667,7 @@ public function in($prompt, $options = null, $default = null) * @param int|array $options Array of options to use, or an integer to wrap the text to. * @return string Wrapped / indented text * @see \Cake\Utility\Text::wrap() - * @link https://book.cakephp.org/3.0/en/console-and-shells.html#Shell::wrapText + * @link https://book.cakephp.org/3/en/console-and-shells.html#Shell::wrapText */ public function wrapText($text, $options = []) { @@ -678,7 +677,7 @@ public function wrapText($text, $options = []) /** * Output at the verbose level. * - * @param string|array $message A string or an array of strings to output + * @param string|string[] $message A string or an array of strings to output * @param int $newlines Number of newlines to append * @return int|bool The number of bytes returned from writing to stdout. */ @@ -690,7 +689,7 @@ public function verbose($message, $newlines = 1) /** * Output at all levels. * - * @param string|array $message A string or an array of strings to output + * @param string|string[] $message A string or an array of strings to output * @param int $newlines Number of newlines to append * @return int|bool The number of bytes returned from writing to stdout. */ @@ -710,11 +709,11 @@ public function quiet($message, $newlines = 1) * present in most shells. Using Shell::QUIET for a message means it will always display. * While using Shell::VERBOSE means it will only display when verbose output is toggled. * - * @param string|array|null $message A string or an array of strings to output + * @param string|string[]|null $message A string or an array of strings to output * @param int $newlines Number of newlines to append * @param int $level The message's output level, see above. * @return int|bool The number of bytes returned from writing to stdout. - * @link https://book.cakephp.org/3.0/en/console-and-shells.html#Shell::out + * @link https://book.cakephp.org/3/en/console-and-shells.html#Shell::out */ public function out($message = null, $newlines = 1, $level = Shell::NORMAL) { @@ -725,7 +724,7 @@ public function out($message = null, $newlines = 1, $level = Shell::NORMAL) * Outputs a single or multiple error messages to stderr. If no parameters * are passed outputs just a newline. * - * @param string|array|null $message A string or an array of strings to output + * @param string|string[]|null $message A string or an array of strings to output * @param int $newlines Number of newlines to append * @return int|bool The number of bytes returned from writing to stderr. */ @@ -737,11 +736,11 @@ public function err($message = null, $newlines = 1) /** * Convenience method for out() that wraps message between tag * - * @param string|array|null $message A string or an array of strings to output + * @param string|string[]|null $message A string or an array of strings to output * @param int $newlines Number of newlines to append * @param int $level The message's output level, see above. * @return int|bool The number of bytes returned from writing to stdout. - * @see https://book.cakephp.org/3.0/en/console-and-shells.html#Shell::out + * @see https://book.cakephp.org/3/en/console-and-shells.html#Shell::out */ public function info($message = null, $newlines = 1, $level = Shell::NORMAL) { @@ -751,10 +750,10 @@ public function info($message = null, $newlines = 1, $level = Shell::NORMAL) /** * Convenience method for err() that wraps message between tag * - * @param string|array|null $message A string or an array of strings to output + * @param string|string[]|null $message A string or an array of strings to output * @param int $newlines Number of newlines to append * @return int|bool The number of bytes returned from writing to stderr. - * @see https://book.cakephp.org/3.0/en/console-and-shells.html#Shell::err + * @see https://book.cakephp.org/3/en/console-and-shells.html#Shell::err */ public function warn($message = null, $newlines = 1) { @@ -764,11 +763,11 @@ public function warn($message = null, $newlines = 1) /** * Convenience method for out() that wraps message between tag * - * @param string|array|null $message A string or an array of strings to output + * @param string|string[]|null $message A string or an array of strings to output * @param int $newlines Number of newlines to append * @param int $level The message's output level, see above. * @return int|bool The number of bytes returned from writing to stdout. - * @see https://book.cakephp.org/3.0/en/console-and-shells.html#Shell::out + * @see https://book.cakephp.org/3/en/console-and-shells.html#Shell::out */ public function success($message = null, $newlines = 1, $level = Shell::NORMAL) { @@ -805,7 +804,7 @@ protected function wrapMessageWithType($messageType, $message) * * @param int $multiplier Number of times the linefeed sequence should be repeated * @return string - * @link https://book.cakephp.org/3.0/en/console-and-shells.html#Shell::nl + * @link https://book.cakephp.org/3/en/console-and-shells.html#Shell::nl */ public function nl($multiplier = 1) { @@ -818,7 +817,7 @@ public function nl($multiplier = 1) * @param int $newlines Number of newlines to pre- and append * @param int $width Width of the line, defaults to 63 * @return void - * @link https://book.cakephp.org/3.0/en/console-and-shells.html#Shell::hr + * @link https://book.cakephp.org/3/en/console-and-shells.html#Shell::hr */ public function hr($newlines = 0, $width = 63) { @@ -827,13 +826,13 @@ public function hr($newlines = 0, $width = 63) /** * Displays a formatted error message - * and exits the application with status code 1 + * and exits the application with an error code. * * @param string $message The error message * @param int $exitCode The exit code for the shell task. * @throws \Cake\Console\Exception\StopException * @return void - * @link https://book.cakephp.org/3.0/en/console-and-shells.html#styling-output + * @link https://book.cakephp.org/3/en/console-and-shells.html#styling-output */ public function abort($message, $exitCode = self::CODE_ERROR) { @@ -850,7 +849,7 @@ public function abort($message, $exitCode = self::CODE_ERROR) * @param int $exitCode The exit code for the shell task. * @throws \Cake\Console\Exception\StopException * @return int Error code - * @link https://book.cakephp.org/3.0/en/console-and-shells.html#styling-output + * @link https://book.cakephp.org/3/en/console-and-shells.html#styling-output * @deprecated 3.2.0 Use Shell::abort() instead. */ public function error($title, $message = null, $exitCode = self::CODE_ERROR) @@ -871,7 +870,7 @@ public function error($title, $message = null, $exitCode = self::CODE_ERROR) * Clear the console * * @return void - * @link https://book.cakephp.org/3.0/en/console-and-shells.html#console-output + * @link https://book.cakephp.org/3/en/console-and-shells.html#console-output */ public function clear() { @@ -892,7 +891,7 @@ public function clear() * @param string $path Where to put the file. * @param string $contents Content to put in the file. * @return bool Success - * @link https://book.cakephp.org/3.0/en/console-and-shells.html#creating-files + * @link https://book.cakephp.org/3/en/console-and-shells.html#creating-files */ public function createFile($path, $contents) { @@ -953,7 +952,7 @@ public function createFile($path, $contents) * * @param string $file Absolute file path * @return string short path - * @link https://book.cakephp.org/3.0/en/console-and-shells.html#Shell::shortPath + * @link https://book.cakephp.org/3/en/console-and-shells.html#Shell::shortPath */ public function shortPath($file) { diff --git a/app/vendor/cakephp/cakephp/src/Console/ShellDispatcher.php b/app/vendor/cakephp/cakephp/src/Console/ShellDispatcher.php index 03399ca56..851407fd3 100644 --- a/app/vendor/cakephp/cakephp/src/Console/ShellDispatcher.php +++ b/app/vendor/cakephp/cakephp/src/Console/ShellDispatcher.php @@ -31,7 +31,6 @@ */ class ShellDispatcher { - /** * Contains arguments parsed from the command line. * @@ -354,7 +353,7 @@ protected function _handleAlias($shell) * Check if a shell class exists for the given name. * * @param string $shell The shell name to look for. - * @return string|bool Either the classname or false. + * @return string|false Either the classname or false. */ protected function _shellExists($shell) { diff --git a/app/vendor/cakephp/cakephp/src/Console/TaskRegistry.php b/app/vendor/cakephp/cakephp/src/Console/TaskRegistry.php index 1655d989a..e19230268 100644 --- a/app/vendor/cakephp/cakephp/src/Console/TaskRegistry.php +++ b/app/vendor/cakephp/cakephp/src/Console/TaskRegistry.php @@ -21,10 +21,11 @@ /** * Registry for Tasks. Provides features * for lazily loading tasks. + * + * @extends \Cake\Core\ObjectRegistry<\Cake\Console\Shell> */ class TaskRegistry extends ObjectRegistry { - /** * Shell to use to set params to tasks. * @@ -62,7 +63,7 @@ protected function _resolveClassName($class) * and Cake\Core\ObjectRegistry::unload() * * @param string $class The classname that is missing. - * @param string $plugin The plugin the task is missing in. + * @param string|null $plugin The plugin the task is missing in. * @return void * @throws \Cake\Console\Exception\MissingTaskException */ @@ -70,7 +71,7 @@ protected function _throwMissingClassError($class, $plugin) { throw new MissingTaskException([ 'class' => $class, - 'plugin' => $plugin + 'plugin' => $plugin, ]); } diff --git a/app/vendor/cakephp/cakephp/src/Controller/Component.php b/app/vendor/cakephp/cakephp/src/Controller/Component.php index 726e1b64a..a6f1064db 100644 --- a/app/vendor/cakephp/cakephp/src/Controller/Component.php +++ b/app/vendor/cakephp/cakephp/src/Controller/Component.php @@ -53,7 +53,7 @@ * While the controller is not an explicit argument for the callback methods it * is the subject of each event and can be fetched using Event::getSubject(). * - * @link https://book.cakephp.org/3.0/en/controllers/components.html + * @link https://book.cakephp.org/3/en/controllers/components.html * @see \Cake\Controller\Controller::$components */ class Component implements EventListenerInterface diff --git a/app/vendor/cakephp/cakephp/src/Controller/Component/AuthComponent.php b/app/vendor/cakephp/cakephp/src/Controller/Component/AuthComponent.php index 9420bdd38..3264b505b 100644 --- a/app/vendor/cakephp/cakephp/src/Controller/Component/AuthComponent.php +++ b/app/vendor/cakephp/cakephp/src/Controller/Component/AuthComponent.php @@ -34,16 +34,17 @@ * * @property \Cake\Controller\Component\RequestHandlerComponent $RequestHandler * @property \Cake\Controller\Component\FlashComponent $Flash - * @link https://book.cakephp.org/3.0/en/controllers/components/authentication.html + * @link https://book.cakephp.org/3/en/controllers/components/authentication.html */ class AuthComponent extends Component { - use EventDispatcherTrait; /** * The query string key used for remembering the referrered page when getting * redirected to login. + * + * @var string */ const QUERY_STRING_REDIRECT = 'redirect'; @@ -165,7 +166,7 @@ class AuthComponent extends Component 'authError' => null, 'unauthorizedRedirect' => true, 'storage' => 'Session', - 'checkAuthIn' => 'Controller.startup' + 'checkAuthIn' => 'Controller.startup', ]; /** @@ -321,7 +322,8 @@ public function authCheck(Event $event) return $result; } - if ($isLoginAction || + if ( + $isLoginAction || empty($this->_config['authorize']) || $this->isAuthorized($this->user()) ) { @@ -489,15 +491,15 @@ protected function _setDefaults() 'flash' => [ 'element' => 'error', 'key' => 'flash', - 'params' => ['class' => 'error'] + 'params' => ['class' => 'error'], ], 'loginAction' => [ 'controller' => 'Users', 'action' => 'login', - 'plugin' => null + 'plugin' => null, ], 'logoutRedirect' => $this->_config['loginAction'], - 'authError' => __d('cake', 'You are not authorized to access that location.') + 'authError' => __d('cake', 'You are not authorized to access that location.'), ]; $config = $this->getConfig(); @@ -618,7 +620,7 @@ public function getAuthorize($alias) * * @param string|string[]|null $actions Controller action name or array of actions * @return void - * @link https://book.cakephp.org/3.0/en/controllers/components/authentication.html#making-actions-public + * @link https://book.cakephp.org/3/en/controllers/components/authentication.html#making-actions-public */ public function allow($actions = null) { @@ -649,7 +651,7 @@ public function allow($actions = null) * @param string|string[]|null $actions Controller action name or array of actions * @return void * @see \Cake\Controller\Component\AuthComponent::allow() - * @link https://book.cakephp.org/3.0/en/controllers/components/authentication.html#making-actions-require-authorization + * @link https://book.cakephp.org/3/en/controllers/components/authentication.html#making-actions-require-authorization */ public function deny($actions = null) { @@ -675,7 +677,7 @@ public function deny($actions = null) * * @param array|\ArrayAccess $user User data. * @return void - * @link https://book.cakephp.org/3.0/en/controllers/components/authentication.html#identifying-users-and-logging-them-in + * @link https://book.cakephp.org/3/en/controllers/components/authentication.html#identifying-users-and-logging-them-in */ public function setUser($user) { @@ -689,7 +691,7 @@ public function setUser($user) * which the authenticate classes can listen for and perform custom logout logic. * * @return string Normalized config `logoutRedirect` - * @link https://book.cakephp.org/3.0/en/controllers/components/authentication.html#logging-users-out + * @link https://book.cakephp.org/3/en/controllers/components/authentication.html#logging-users-out */ public function logout() { @@ -709,7 +711,7 @@ public function logout() * * @param string|null $key Field to retrieve. Leave null to get entire User record. * @return mixed|null Either User record or null if no user is logged in, or retrieved field if key is specified. - * @link https://book.cakephp.org/3.0/en/controllers/components/authentication.html#accessing-the-logged-in-user + * @link https://book.cakephp.org/3/en/controllers/components/authentication.html#accessing-the-logged-in-user */ public function user($key = null) { @@ -811,7 +813,7 @@ public function redirectUrl($url = null) * Triggers `Auth.afterIdentify` event which the authenticate classes can listen * to. * - * @return array|bool User record data, or false, if the user could not be identified. + * @return array|false User record data, or false, if the user could not be identified. */ public function identify() { @@ -960,7 +962,6 @@ public function __set($name, $value) * Getter for authenticate objects. Will return a particular authenticate object. * * @param string $alias Alias for the authenticate object - * * @return \Cake\Auth\BaseAuthenticate|null */ public function getAuthenticate($alias) @@ -975,7 +976,7 @@ public function getAuthenticate($alias) /** * Set a flash message. Uses the Flash component with values from `flash` config. * - * @param string $message The message to set. + * @param string|false $message The message to set. False to skip. * @return void */ public function flash($message) diff --git a/app/vendor/cakephp/cakephp/src/Controller/Component/CookieComponent.php b/app/vendor/cakephp/cakephp/src/Controller/Component/CookieComponent.php index 795350c9e..d45c3ceec 100644 --- a/app/vendor/cakephp/cakephp/src/Controller/Component/CookieComponent.php +++ b/app/vendor/cakephp/cakephp/src/Controller/Component/CookieComponent.php @@ -32,7 +32,7 @@ * - Store non-scalar data. * - Use hash compatible syntax to read/write/delete values. * - * @link https://book.cakephp.org/3.0/en/controllers/components/cookie.html + * @link https://book.cakephp.org/3/en/controllers/components/cookie.html * @deprecated 3.5.0 Use Cake\Http\Middleware\EncryptedCookieMiddleware and Cake\Http\Cookie\Cookie methods instead. */ class CookieComponent extends Component @@ -154,7 +154,7 @@ public function initialize(array $config) * ``` * * @param string $keyname The top level keyname to configure. - * @param null|string|array $option Either the option name to set, or an array of options to set, + * @param array|string|null $option Either the option name to set, or an array of options to set, * or null to read config options for a given key. * @param string|null $value Either the value to set, or empty when $option is an array. * @return array|null diff --git a/app/vendor/cakephp/cakephp/src/Controller/Component/CsrfComponent.php b/app/vendor/cakephp/cakephp/src/Controller/Component/CsrfComponent.php index 5301b4da9..abd6ca58d 100644 --- a/app/vendor/cakephp/cakephp/src/Controller/Component/CsrfComponent.php +++ b/app/vendor/cakephp/cakephp/src/Controller/Component/CsrfComponent.php @@ -41,7 +41,6 @@ */ class CsrfComponent extends Component { - /** * Default config for the CSRF handling. * diff --git a/app/vendor/cakephp/cakephp/src/Controller/Component/FlashComponent.php b/app/vendor/cakephp/cakephp/src/Controller/Component/FlashComponent.php index 62bf7bd5f..013713215 100644 --- a/app/vendor/cakephp/cakephp/src/Controller/Component/FlashComponent.php +++ b/app/vendor/cakephp/cakephp/src/Controller/Component/FlashComponent.php @@ -30,7 +30,6 @@ */ class FlashComponent extends Component { - /** * The Session object instance * @@ -49,7 +48,7 @@ class FlashComponent extends Component 'element' => 'default', 'params' => [], 'clear' => false, - 'duplicate' => true + 'duplicate' => true, ]; /** @@ -125,7 +124,7 @@ public function set($message, array $options = []) 'message' => $message, 'key' => $options['key'], 'element' => $options['element'], - 'params' => $options['params'] + 'params' => $options['params'], ]; $this->getSession()->write('Flash.' . $options['key'], $messages); diff --git a/app/vendor/cakephp/cakephp/src/Controller/Component/PaginatorComponent.php b/app/vendor/cakephp/cakephp/src/Controller/Component/PaginatorComponent.php index e8b769f06..d70af2fe4 100644 --- a/app/vendor/cakephp/cakephp/src/Controller/Component/PaginatorComponent.php +++ b/app/vendor/cakephp/cakephp/src/Controller/Component/PaginatorComponent.php @@ -29,12 +29,11 @@ * * You configure pagination when calling paginate(). See that method for more details. * - * @link https://book.cakephp.org/3.0/en/controllers/components/pagination.html + * @link https://book.cakephp.org/3/en/controllers/components/pagination.html * @mixin \Cake\Datasource\Paginator */ class PaginatorComponent extends Component { - /** * Default pagination settings. * @@ -54,7 +53,7 @@ class PaginatorComponent extends Component 'page' => 1, 'limit' => 20, 'maxLimit' => 100, - 'whitelist' => ['limit', 'sort', 'page', 'direction'] + 'whitelist' => ['limit', 'sort', 'page', 'direction'], ]; /** @@ -241,7 +240,7 @@ public function mergeOptions($alias, $settings) * Set paginator instance. * * @param \Cake\Datasource\Paginator $paginator Paginator instance. - * @return self + * @return $this */ public function setPaginator(Paginator $paginator) { diff --git a/app/vendor/cakephp/cakephp/src/Controller/Component/RequestHandlerComponent.php b/app/vendor/cakephp/cakephp/src/Controller/Component/RequestHandlerComponent.php index 85482689a..1467dfa0c 100644 --- a/app/vendor/cakephp/cakephp/src/Controller/Component/RequestHandlerComponent.php +++ b/app/vendor/cakephp/cakephp/src/Controller/Component/RequestHandlerComponent.php @@ -36,11 +36,10 @@ * and the like. These units have no use for AJAX requests, and this Component can tell how Cake * should respond to the different needs of a handheld computer and a desktop machine. * - * @link https://book.cakephp.org/3.0/en/controllers/components/request-handling.html + * @link https://book.cakephp.org/3/en/controllers/components/request-handling.html */ class RequestHandlerComponent extends Component { - /** * @var bool * @deprecated 3.4.0 Unused. Will be removed in 4.0.0 @@ -58,7 +57,7 @@ class RequestHandlerComponent extends Component public $ext; /** - * The template to use when rendering the given content type. + * The template type to use when rendering the given content type. * * @var string|null */ @@ -83,7 +82,7 @@ class RequestHandlerComponent extends Component 'checkHttpCache' => true, 'viewClassMap' => [], 'inputTypeMap' => [], - 'enableBeforeRedirect' => true + 'enableBeforeRedirect' => true, ]; /** @@ -107,12 +106,12 @@ public function __construct(ComponentRegistry $registry, array $config = []) 'viewClassMap' => [ 'json' => 'Json', 'xml' => 'Xml', - 'ajax' => 'Ajax' + 'ajax' => 'Ajax', ], 'inputTypeMap' => [ 'json' => ['json_decode', true], 'xml' => [[$this, 'convertXml']], - ] + ], ]; parent::__construct($registry, $config); } @@ -288,14 +287,14 @@ public function beforeRedirect(Event $event, $url, Response $response) } /** @var \Cake\Controller\Controller $controller */ $controller = $event->getSubject(); - $response->body($controller->requestAction($url, [ + $response = $response->withStringBody($controller->requestAction($url, [ 'return', 'bare' => false, 'environment' => [ - 'REQUEST_METHOD' => 'GET' + 'REQUEST_METHOD' => 'GET', ], 'query' => $query, - 'cookies' => $request->getCookieParams() + 'cookies' => $request->getCookieParams(), ])); return $response->withStatus(200); @@ -343,7 +342,8 @@ public function beforeRender(Event $event) $response = $response->withCharset(Configure::read('App.encoding')); } - if ($this->_config['checkHttpCache'] && + if ( + $this->_config['checkHttpCache'] && $response->checkNotModified($request) ) { $controller->setResponse($response); @@ -498,7 +498,8 @@ public function requestedWith($type = null) $request = $controller->getRequest(); $response = $controller->getResponse(); - if (!$request->is('post') && + if ( + !$request->is('post') && !$request->is('put') && !$request->is('patch') && !$request->is('delete') @@ -724,7 +725,7 @@ public function responseType() * Maps a content type alias back to its mime-type(s) * * @param string|array $alias String alias to convert back into a content type. Or an array of aliases to map. - * @return string|null|array Null on an undefined alias. String value of the mapped alias type. If an + * @return string|array|null Null on an undefined alias. String value of the mapped alias type. If an * alias maps to more than one content type, the first one will be returned. If an array is provided * for $alias, an array of mapped types will be returned. */ diff --git a/app/vendor/cakephp/cakephp/src/Controller/Component/SecurityComponent.php b/app/vendor/cakephp/cakephp/src/Controller/Component/SecurityComponent.php index d59efb3a6..ed5d6e485 100644 --- a/app/vendor/cakephp/cakephp/src/Controller/Component/SecurityComponent.php +++ b/app/vendor/cakephp/cakephp/src/Controller/Component/SecurityComponent.php @@ -35,13 +35,14 @@ * - Requiring that SSL be used. * - Limiting cross controller communication. * - * @link https://book.cakephp.org/3.0/en/controllers/components/security.html + * @link https://book.cakephp.org/3/en/controllers/components/security.html */ class SecurityComponent extends Component { - /** * Default message used for exceptions thrown + * + * @var string */ const DEFAULT_EXCEPTION_MESSAGE = 'The request has been black-holed'; @@ -75,7 +76,7 @@ class SecurityComponent extends Component 'allowedActions' => [], 'unlockedFields' => [], 'unlockedActions' => [], - 'validatePost' => true + 'validatePost' => true, ]; /** @@ -116,7 +117,8 @@ public function startup(Event $event) throw new AuthSecurityException(sprintf('Action %s is defined as the blackhole callback.', $this->_action)); } - if (!in_array($this->_action, (array)$this->_config['unlockedActions']) && + if ( + !in_array($this->_action, (array)$this->_config['unlockedActions']) && $hasData && $isNotRequestAction && $this->_config['validatePost'] @@ -183,7 +185,7 @@ public function requireAuth($actions) * @param \Cake\Controller\Exception\SecurityException|null $exception Additional debug info describing the cause * @return mixed If specified, controller blackHoleCallback's response, or no return otherwise * @see \Cake\Controller\Component\SecurityComponent::$blackHoleCallback - * @link https://book.cakephp.org/3.0/en/controllers/components/security.html#handling-blackhole-callbacks + * @link https://book.cakephp.org/3/en/controllers/components/security.html#handling-blackhole-callbacks * @throws \Cake\Http\Exception\BadRequestException */ public function blackHole(Controller $controller, $error = '', SecurityException $exception = null) @@ -237,7 +239,8 @@ protected function _requireMethod($method, $actions = []) */ protected function _secureRequired(Controller $controller) { - if (is_array($this->_config['requireSecure']) && + if ( + is_array($this->_config['requireSecure']) && !empty($this->_config['requireSecure']) ) { $requireSecure = $this->_config['requireSecure']; @@ -264,7 +267,8 @@ protected function _secureRequired(Controller $controller) protected function _authRequired(Controller $controller) { $request = $controller->getRequest(); - if (is_array($this->_config['requireAuth']) && + if ( + is_array($this->_config['requireAuth']) && !empty($this->_config['requireAuth']) && $request->getData() ) { @@ -279,8 +283,10 @@ protected function _authRequired(Controller $controller) if ($this->session->check('_Token')) { $tData = $this->session->read('_Token'); - if (!empty($tData['allowedControllers']) && - !in_array($request->getParam('controller'), $tData['allowedControllers'])) { + if ( + !empty($tData['allowedControllers']) && + !in_array($request->getParam('controller'), $tData['allowedControllers']) + ) { throw new AuthSecurityException( sprintf( 'Controller \'%s\' was not found in allowed controllers: \'%s\'.', @@ -289,7 +295,8 @@ protected function _authRequired(Controller $controller) ) ); } - if (!empty($tData['allowedActions']) && + if ( + !empty($tData['allowedActions']) && !in_array($request->getParam('action'), $tData['allowedActions']) ) { throw new AuthSecurityException( @@ -353,6 +360,9 @@ protected function _validToken(Controller $controller) if (!isset($check['_Token']['fields'])) { throw new AuthSecurityException(sprintf($message, '_Token.fields')); } + if (!is_string($check['_Token']['fields'])) { + throw new AuthSecurityException("'_Token.fields' was invalid."); + } if (!isset($check['_Token']['unlocked'])) { throw new AuthSecurityException(sprintf($message, '_Token.unlocked')); } @@ -393,7 +403,7 @@ protected function _hashParts(Controller $controller) Router::url($request->getRequestTarget()), serialize($fieldList), $unlocked, - $session->id() + $session->id(), ]; } @@ -587,7 +597,7 @@ public function generateToken(ServerRequest $request) $this->session->write('_Token', $token); return $request->withParam('_Token', [ - 'unlockedFields' => $token['unlockedFields'] + 'unlockedFields' => $token['unlockedFields'], ]); } diff --git a/app/vendor/cakephp/cakephp/src/Controller/ComponentRegistry.php b/app/vendor/cakephp/cakephp/src/Controller/ComponentRegistry.php index f395c8c22..05a915531 100644 --- a/app/vendor/cakephp/cakephp/src/Controller/ComponentRegistry.php +++ b/app/vendor/cakephp/cakephp/src/Controller/ComponentRegistry.php @@ -24,16 +24,17 @@ * ComponentRegistry is a registry for loaded components * * Handles loading, constructing and binding events for component class objects. + * + * @extends \Cake\Core\ObjectRegistry<\Cake\Controller\Component> */ class ComponentRegistry extends ObjectRegistry implements EventDispatcherInterface { - use EventDispatcherTrait; /** * The controller that this collection was initialized with. * - * @var \Cake\Controller\Controller + * @var \Cake\Controller\Controller|null */ protected $_Controller; @@ -52,7 +53,7 @@ public function __construct(Controller $controller = null) /** * Get the controller associated with the collection. * - * @return \Cake\Controller\Controller Controller instance + * @return \Cake\Controller\Controller|null Controller instance or null if not set. */ public function getController() { @@ -63,12 +64,14 @@ public function getController() * Set the controller associated with the collection. * * @param \Cake\Controller\Controller $controller Controller instance. - * @return void + * @return $this */ public function setController(Controller $controller) { $this->_Controller = $controller; $this->setEventManager($controller->getEventManager()); + + return $this; } /** @@ -91,7 +94,7 @@ protected function _resolveClassName($class) * and Cake\Core\ObjectRegistry::unload() * * @param string $class The classname that is missing. - * @param string $plugin The plugin the component is missing in. + * @param string|null $plugin The plugin the component is missing in. * @return void * @throws \Cake\Controller\Exception\MissingComponentException */ @@ -99,7 +102,7 @@ protected function _throwMissingClassError($class, $plugin) { throw new MissingComponentException([ 'class' => $class . 'Component', - 'plugin' => $plugin + 'plugin' => $plugin, ]); } diff --git a/app/vendor/cakephp/cakephp/src/Controller/Controller.php b/app/vendor/cakephp/cakephp/src/Controller/Controller.php index df07d6bac..f40114984 100644 --- a/app/vendor/cakephp/cakephp/src/Controller/Controller.php +++ b/app/vendor/cakephp/cakephp/src/Controller/Controller.php @@ -82,11 +82,10 @@ * @property \Cake\Controller\Component\RequestHandlerComponent $RequestHandler * @property \Cake\Controller\Component\SecurityComponent $Security * @method bool isAuthorized($user) - * @link https://book.cakephp.org/3.0/en/controllers.html + * @link https://book.cakephp.org/3/en/controllers.html */ class Controller implements EventListenerInterface, EventDispatcherInterface { - use EventDispatcherTrait; use LocatorAwareTrait; use LogTrait; @@ -114,8 +113,7 @@ class Controller implements EventListenerInterface, EventDispatcherInterface * ``` * * @var array - * @link https://book.cakephp.org/3.0/en/controllers.html#configuring-helpers-to-load - * + * @link https://book.cakephp.org/3/en/controllers.html#configuring-helpers-to-load * @deprecated 3.0.0 You should configure helpers in your AppView::initialize() method. */ public $helpers = []; @@ -128,7 +126,7 @@ class Controller implements EventListenerInterface, EventDispatcherInterface * Deprecated 3.6.0: The property will become protected in 4.0.0. Use getRequest()/setRequest instead. * * @var \Cake\Http\ServerRequest - * @link https://book.cakephp.org/3.0/en/controllers/request-response.html#request + * @link https://book.cakephp.org/3/en/controllers/request-response.html#request */ public $request; @@ -138,7 +136,7 @@ class Controller implements EventListenerInterface, EventDispatcherInterface * Deprecated 3.6.0: The property will become protected in 4.0.0. Use getResponse()/setResponse instead. * @var \Cake\Http\Response - * @link https://book.cakephp.org/3.0/en/controllers/request-response.html#response + * @link https://book.cakephp.org/3/en/controllers/request-response.html#response */ public $response; @@ -147,7 +145,7 @@ class Controller implements EventListenerInterface, EventDispatcherInterface * * @var string */ - protected $_responseClass = 'Cake\Http\Response'; + protected $_responseClass = Response::class; /** * Settings for pagination. @@ -185,8 +183,7 @@ class Controller implements EventListenerInterface, EventDispatcherInterface * ``` * * @var array - * @link https://book.cakephp.org/3.0/en/controllers/components.html - * + * @link https://book.cakephp.org/3/en/controllers/components.html * @deprecated 3.0.0 You should configure components in your Controller::initialize() method. */ public $components = []; @@ -208,7 +205,7 @@ class Controller implements EventListenerInterface, EventDispatcherInterface * @deprecated 3.7.0 Use ViewBuilder::setOptions() or any one of it's setter methods instead. */ protected $_validViewOptions = [ - 'passedArgs' + 'passedArgs', ]; /** @@ -295,7 +292,6 @@ public function initialize() * If called with the first parameter, it will be set as the controller $this->_components property * * @param \Cake\Controller\ComponentRegistry|null $components Component registry. - * * @return \Cake\Controller\ComponentRegistry */ public function components($components = null) @@ -402,7 +398,7 @@ public function __set($name, $value) { $deprecated = [ 'name' => 'setName', - 'plugin' => 'setPlugin' + 'plugin' => 'setPlugin', ]; if (isset($deprecated[$name])) { $method = $deprecated[$name]; @@ -604,7 +600,7 @@ public function invokeAction() 'plugin' => $request->getParam('plugin'), ]); } - /* @var callable $callable */ + /** @var callable $callable */ $callable = [$this, $request->getParam('action')]; $result = $callable(...array_values($request->getParam('pass'))); @@ -708,11 +704,10 @@ public function shutdownProcess() /** * Redirects to given $url, after turning off $this->autoRender. * - * @param string|array $url A string or array-based URL pointing to another location within the app, - * or an absolute URL - * @param int $status HTTP status code (eg: 301) + * @param string|array|\Psr\Http\Message\UriInterface $url A string, array-based URL or UriInterface instance. + * @param int $status HTTP status code. Defaults to `302`. * @return \Cake\Http\Response|null - * @link https://book.cakephp.org/3.0/en/controllers.html#Controller::redirect + * @link https://book.cakephp.org/3/en/controllers.html#Controller::redirect */ public function redirect($url, $status = 302) { @@ -766,7 +761,7 @@ public function setAction($action, ...$args) * @param string|null $view View to use for rendering * @param string|null $layout Layout to use * @return \Cake\Http\Response A response object containing the rendered view. - * @link https://book.cakephp.org/3.0/en/controllers.html#rendering-a-view + * @link https://book.cakephp.org/3/en/controllers.html#rendering-a-view */ public function render($view = null, $layout = null) { @@ -862,7 +857,7 @@ public function referer($default = null, $local = false) * (e.g: Table instance, 'TableName' or a Query object) * @param array $settings The settings/configuration used for pagination. * @return \Cake\ORM\ResultSet|\Cake\Datasource\ResultSetInterface Query results - * @link https://book.cakephp.org/3.0/en/controllers.html#paginating-a-model + * @link https://book.cakephp.org/3/en/controllers.html#paginating-a-model * @throws \RuntimeException When no compatible table object can be found. */ public function paginate($object = null, array $settings = []) @@ -923,7 +918,7 @@ public function isAction($action) * * @param \Cake\Event\Event $event An Event instance * @return \Cake\Http\Response|null - * @link https://book.cakephp.org/3.0/en/controllers.html#request-life-cycle-callbacks + * @link https://book.cakephp.org/3/en/controllers.html#request-life-cycle-callbacks */ public function beforeFilter(Event $event) { @@ -936,7 +931,7 @@ public function beforeFilter(Event $event) * * @param \Cake\Event\Event $event An Event instance * @return \Cake\Http\Response|null - * @link https://book.cakephp.org/3.0/en/controllers.html#request-life-cycle-callbacks + * @link https://book.cakephp.org/3/en/controllers.html#request-life-cycle-callbacks */ public function beforeRender(Event $event) { @@ -957,7 +952,7 @@ public function beforeRender(Event $event) * or an absolute URL * @param \Cake\Http\Response $response The response object. * @return \Cake\Http\Response|null - * @link https://book.cakephp.org/3.0/en/controllers.html#request-life-cycle-callbacks + * @link https://book.cakephp.org/3/en/controllers.html#request-life-cycle-callbacks */ public function beforeRedirect(Event $event, $url, Response $response) { @@ -969,7 +964,7 @@ public function beforeRedirect(Event $event, $url, Response $response) * * @param \Cake\Event\Event $event An Event instance * @return \Cake\Http\Response|null - * @link https://book.cakephp.org/3.0/en/controllers.html#request-life-cycle-callbacks + * @link https://book.cakephp.org/3/en/controllers.html#request-life-cycle-callbacks */ public function afterFilter(Event $event) { diff --git a/app/vendor/cakephp/cakephp/src/Controller/ErrorController.php b/app/vendor/cakephp/cakephp/src/Controller/ErrorController.php index 51b52957a..dfd19a78d 100644 --- a/app/vendor/cakephp/cakephp/src/Controller/ErrorController.php +++ b/app/vendor/cakephp/cakephp/src/Controller/ErrorController.php @@ -23,7 +23,6 @@ */ class ErrorController extends Controller { - /** * Initialization hook method. * diff --git a/app/vendor/cakephp/cakephp/src/Controller/Exception/AuthSecurityException.php b/app/vendor/cakephp/cakephp/src/Controller/Exception/AuthSecurityException.php index f902d5443..6db3791cc 100644 --- a/app/vendor/cakephp/cakephp/src/Controller/Exception/AuthSecurityException.php +++ b/app/vendor/cakephp/cakephp/src/Controller/Exception/AuthSecurityException.php @@ -19,6 +19,7 @@ class AuthSecurityException extends SecurityException { /** * Security Exception type + * * @var string */ protected $_type = 'auth'; diff --git a/app/vendor/cakephp/cakephp/src/Controller/Exception/MissingActionException.php b/app/vendor/cakephp/cakephp/src/Controller/Exception/MissingActionException.php index c6653539b..fbc0b87de 100644 --- a/app/vendor/cakephp/cakephp/src/Controller/Exception/MissingActionException.php +++ b/app/vendor/cakephp/cakephp/src/Controller/Exception/MissingActionException.php @@ -20,7 +20,6 @@ */ class MissingActionException extends Exception { - /** * {@inheritDoc} */ diff --git a/app/vendor/cakephp/cakephp/src/Controller/Exception/MissingComponentException.php b/app/vendor/cakephp/cakephp/src/Controller/Exception/MissingComponentException.php index 574e70731..b67da8340 100644 --- a/app/vendor/cakephp/cakephp/src/Controller/Exception/MissingComponentException.php +++ b/app/vendor/cakephp/cakephp/src/Controller/Exception/MissingComponentException.php @@ -19,6 +19,8 @@ */ class MissingComponentException extends Exception { - + /** + * @inheritDoc + */ protected $_messageTemplate = 'Component class %s could not be found.'; } diff --git a/app/vendor/cakephp/cakephp/src/Controller/Exception/SecurityException.php b/app/vendor/cakephp/cakephp/src/Controller/Exception/SecurityException.php index efcd18aea..98a230176 100644 --- a/app/vendor/cakephp/cakephp/src/Controller/Exception/SecurityException.php +++ b/app/vendor/cakephp/cakephp/src/Controller/Exception/SecurityException.php @@ -21,6 +21,7 @@ class SecurityException extends BadRequestException { /** * Security Exception type + * * @var string */ protected $_type = 'secure'; @@ -28,7 +29,7 @@ class SecurityException extends BadRequestException /** * Reason for request blackhole * - * @var string + * @var string|null */ protected $_reason; @@ -57,17 +58,19 @@ public function setMessage($message) * Set Reason * * @param string|null $reason Reason details - * @return void + * @return $this */ public function setReason($reason = null) { $this->_reason = $reason; + + return $this; } /** * Get Reason * - * @return string + * @return string|null */ public function getReason() { diff --git a/app/vendor/cakephp/cakephp/src/Core/App.php b/app/vendor/cakephp/cakephp/src/Core/App.php index b18d09c9c..14fdc1d6f 100644 --- a/app/vendor/cakephp/cakephp/src/Core/App.php +++ b/app/vendor/cakephp/cakephp/src/Core/App.php @@ -36,11 +36,10 @@ * Plugins can be located with App as well. Using Plugin::path('DebugKit') for example, will * give you the full path to the DebugKit plugin. * - * @link https://book.cakephp.org/3.0/en/core-libraries/app.html + * @link https://book.cakephp.org/3/en/core-libraries/app.html */ class App { - /** * Return the class name namespaced. This method checks if the class is defined on the * application/plugin, otherwise try to load from the CakePHP core @@ -48,7 +47,7 @@ class App * @param string $class Class name * @param string $type Type of class * @param string $suffix Class name suffix - * @return false|string False if the class is not found or namespaced class name + * @return string|false False if the class is not found or namespaced class name */ public static function className($class, $type = '', $suffix = '') { @@ -129,7 +128,7 @@ public static function shortName($class, $type, $suffix = '') $nonPluginNamespaces = [ 'Cake', - str_replace('\\', '/', Configure::read('App.namespace')) + str_replace('\\', '/', Configure::read('App.namespace')), ]; if (in_array($pluginName, $nonPluginNamespaces)) { return $name; @@ -172,8 +171,8 @@ protected static function _classExistsInBase($name, $namespace) * * @param string $type type of path * @param string|null $plugin name of plugin - * @return array - * @link https://book.cakephp.org/3.0/en/core-libraries/app.html#finding-paths-to-namespaces + * @return string[] + * @link https://book.cakephp.org/3/en/core-libraries/app.html#finding-paths-to-namespaces */ public static function path($type, $plugin = null) { @@ -205,7 +204,7 @@ public static function path($type, $plugin = null) * Will return the full path to the cache engines package. * * @param string $type Package type. - * @return array Full path to package + * @return string[] Full path to package */ public static function core($type) { diff --git a/app/vendor/cakephp/cakephp/src/Core/BasePlugin.php b/app/vendor/cakephp/cakephp/src/Core/BasePlugin.php index 6d78a3fd3..5170ed6c4 100644 --- a/app/vendor/cakephp/cakephp/src/Core/BasePlugin.php +++ b/app/vendor/cakephp/cakephp/src/Core/BasePlugin.php @@ -24,7 +24,6 @@ */ class BasePlugin implements PluginInterface { - /** * Do bootstrapping or not * diff --git a/app/vendor/cakephp/cakephp/src/Core/ClassLoader.php b/app/vendor/cakephp/cakephp/src/Core/ClassLoader.php index 2f5bdefc7..ecd898048 100644 --- a/app/vendor/cakephp/cakephp/src/Core/ClassLoader.php +++ b/app/vendor/cakephp/cakephp/src/Core/ClassLoader.php @@ -18,7 +18,6 @@ */ class ClassLoader { - /** * An associative array where the key is a namespace prefix and the value * is an array of base directories for classes in that namespace. @@ -97,7 +96,7 @@ public function loadClass($class) * * @param string $prefix The namespace prefix. * @param string $relativeClass The relative class name. - * @return mixed Boolean false if no mapped file can be loaded, or the + * @return string|false Boolean false if no mapped file can be loaded, or the * name of the mapped file that was loaded. */ protected function _loadMappedFile($prefix, $relativeClass) diff --git a/app/vendor/cakephp/cakephp/src/Core/Configure.php b/app/vendor/cakephp/cakephp/src/Core/Configure.php index ae3dbf481..7a9179b3e 100644 --- a/app/vendor/cakephp/cakephp/src/Core/Configure.php +++ b/app/vendor/cakephp/cakephp/src/Core/Configure.php @@ -28,18 +28,17 @@ * as methods for loading additional configuration files or storing runtime configuration * for future use. * - * @link https://book.cakephp.org/3.0/en/development/configuration.html + * @link https://book.cakephp.org/3/en/development/configuration.html */ class Configure { - /** * Array of values currently stored in Configure. * * @var array */ protected static $_values = [ - 'debug' => false + 'debug' => false, ]; /** @@ -79,7 +78,7 @@ class Configure * Alternatively can be an array containing key(s) and value(s). * @param mixed $value Value to set for var * @return bool True if write was successful - * @link https://book.cakephp.org/3.0/en/development/configuration.html#writing-configuration-data + * @link https://book.cakephp.org/3/en/development/configuration.html#writing-configuration-data */ public static function write($config, $value = null) { @@ -116,7 +115,7 @@ public static function write($config, $value = null) * @param string|null $var Variable to obtain. Use '.' to access array elements. * @param mixed $default The return value when the configure does not exist * @return mixed Value stored in configure, or null. - * @link https://book.cakephp.org/3.0/en/development/configuration.html#reading-configuration-data + * @link https://book.cakephp.org/3/en/development/configuration.html#reading-configuration-data */ public static function read($var = null, $default = null) { @@ -159,7 +158,7 @@ public static function check($var) * @param string $var Variable to obtain. Use '.' to access array elements. * @return mixed Value stored in configure. * @throws \RuntimeException if the requested configuration is not set. - * @link https://book.cakephp.org/3.0/en/development/configuration.html#reading-configuration-data + * @link https://book.cakephp.org/3/en/development/configuration.html#reading-configuration-data */ public static function readOrFail($var) { @@ -181,7 +180,7 @@ public static function readOrFail($var) * * @param string $var the var to be deleted * @return void - * @link https://book.cakephp.org/3.0/en/development/configuration.html#deleting-configuration-data + * @link https://book.cakephp.org/3/en/development/configuration.html#deleting-configuration-data */ public static function delete($var) { @@ -332,7 +331,7 @@ public static function drop($name) * @param string $config Name of the configured engine to use to read the resource identified by $key. * @param bool $merge if config files should be merged instead of simply overridden * @return bool False if file not found, true if load successful. - * @link https://book.cakephp.org/3.0/en/development/configuration.html#reading-and-writing-configuration-files + * @link https://book.cakephp.org/3/en/development/configuration.html#reading-and-writing-configuration-files */ public static function load($key, $config = 'default', $merge = true) { @@ -440,6 +439,7 @@ public static function version() * @param string $cacheConfig The cache configuration to save into. Defaults to 'default' * @param array|null $data Either an array of data to store, or leave empty to store all values. * @return bool Success + * @throws \RuntimeException */ public static function store($name, $cacheConfig = 'default', $data = null) { @@ -460,6 +460,7 @@ public static function store($name, $cacheConfig = 'default', $data = null) * @param string $name Name of the stored config file to load. * @param string $cacheConfig Name of the Cache configuration to read from. * @return bool Success. + * @throws \RuntimeException */ public static function restore($name, $cacheConfig = 'default') { diff --git a/app/vendor/cakephp/cakephp/src/Core/Configure/ConfigEngineInterface.php b/app/vendor/cakephp/cakephp/src/Core/Configure/ConfigEngineInterface.php index 188c0b9ad..56d70c329 100644 --- a/app/vendor/cakephp/cakephp/src/Core/Configure/ConfigEngineInterface.php +++ b/app/vendor/cakephp/cakephp/src/Core/Configure/ConfigEngineInterface.php @@ -19,7 +19,6 @@ */ interface ConfigEngineInterface { - /** * Read a configuration file/storage key * diff --git a/app/vendor/cakephp/cakephp/src/Core/Configure/Engine/IniConfig.php b/app/vendor/cakephp/cakephp/src/Core/Configure/Engine/IniConfig.php index 66379c91d..4d9ee7ac8 100644 --- a/app/vendor/cakephp/cakephp/src/Core/Configure/Engine/IniConfig.php +++ b/app/vendor/cakephp/cakephp/src/Core/Configure/Engine/IniConfig.php @@ -53,7 +53,6 @@ */ class IniConfig implements ConfigEngineInterface { - use FileConfigTrait; /** diff --git a/app/vendor/cakephp/cakephp/src/Core/Configure/Engine/JsonConfig.php b/app/vendor/cakephp/cakephp/src/Core/Configure/Engine/JsonConfig.php index b45434793..3ae134ab0 100644 --- a/app/vendor/cakephp/cakephp/src/Core/Configure/Engine/JsonConfig.php +++ b/app/vendor/cakephp/cakephp/src/Core/Configure/Engine/JsonConfig.php @@ -38,7 +38,6 @@ */ class JsonConfig implements ConfigEngineInterface { - use FileConfigTrait; /** diff --git a/app/vendor/cakephp/cakephp/src/Core/Configure/Engine/PhpConfig.php b/app/vendor/cakephp/cakephp/src/Core/Configure/Engine/PhpConfig.php index 2cc5eab7a..b1cc8b47b 100644 --- a/app/vendor/cakephp/cakephp/src/Core/Configure/Engine/PhpConfig.php +++ b/app/vendor/cakephp/cakephp/src/Core/Configure/Engine/PhpConfig.php @@ -30,7 +30,7 @@ * ``` * 0, + * 'debug' => false, * 'Security' => [ * 'salt' => 'its-secret' * ], @@ -40,11 +40,10 @@ * ]; * ``` * - * @see Cake\Core\Configure::load() for how to load custom configuration files. + * @see \Cake\Core\Configure::load() for how to load custom configuration files. */ class PhpConfig implements ConfigEngineInterface { - use FileConfigTrait; /** diff --git a/app/vendor/cakephp/cakephp/src/Core/Configure/FileConfigTrait.php b/app/vendor/cakephp/cakephp/src/Core/Configure/FileConfigTrait.php index b7ddeee42..5fafbe0a0 100644 --- a/app/vendor/cakephp/cakephp/src/Core/Configure/FileConfigTrait.php +++ b/app/vendor/cakephp/cakephp/src/Core/Configure/FileConfigTrait.php @@ -22,7 +22,6 @@ */ trait FileConfigTrait { - /** * The path this engine finds files on. * diff --git a/app/vendor/cakephp/cakephp/src/Core/ConventionsTrait.php b/app/vendor/cakephp/cakephp/src/Core/ConventionsTrait.php index 2ca06f0a9..80a873788 100644 --- a/app/vendor/cakephp/cakephp/src/Core/ConventionsTrait.php +++ b/app/vendor/cakephp/cakephp/src/Core/ConventionsTrait.php @@ -21,7 +21,6 @@ */ trait ConventionsTrait { - /** * Creates a fixture name * diff --git a/app/vendor/cakephp/cakephp/src/Core/Exception/Exception.php b/app/vendor/cakephp/cakephp/src/Core/Exception/Exception.php index 6553991a7..a7ecfff0a 100644 --- a/app/vendor/cakephp/cakephp/src/Core/Exception/Exception.php +++ b/app/vendor/cakephp/cakephp/src/Core/Exception/Exception.php @@ -16,10 +16,11 @@ /** * Base class that all CakePHP Exceptions extend. + * + * @method int getCode() */ class Exception extends RuntimeException { - /** * Array of attributes that are passed in from the constructor, and * made available in the view when a development error is displayed. @@ -53,7 +54,7 @@ class Exception extends RuntimeException * Constructor. * * Allows you to create exceptions that are treated as framework errors and disabled - * when debug = 0. + * when debug mode is off. * * @param string|array $message Either the string of the error message, or an array of attributes * that are made available in the view, and sprintf()'d into Exception::$_messageTemplate @@ -92,7 +93,7 @@ public function getAttributes() * - an associative array of "header name" => "header value" * - an array of string headers is also accepted (deprecated) * @param string|null $value The header value. - * @return array + * @return array|null */ public function responseHeader($header = null, $value = null) { diff --git a/app/vendor/cakephp/cakephp/src/Core/Exception/MissingPluginException.php b/app/vendor/cakephp/cakephp/src/Core/Exception/MissingPluginException.php index bb865ac03..636f853a5 100644 --- a/app/vendor/cakephp/cakephp/src/Core/Exception/MissingPluginException.php +++ b/app/vendor/cakephp/cakephp/src/Core/Exception/MissingPluginException.php @@ -17,6 +17,8 @@ */ class MissingPluginException extends Exception { - + /** + * @inheritDoc + */ protected $_messageTemplate = 'Plugin %s could not be found.'; } diff --git a/app/vendor/cakephp/cakephp/src/Core/InstanceConfigTrait.php b/app/vendor/cakephp/cakephp/src/Core/InstanceConfigTrait.php index dd1acc889..9df2ee26e 100644 --- a/app/vendor/cakephp/cakephp/src/Core/InstanceConfigTrait.php +++ b/app/vendor/cakephp/cakephp/src/Core/InstanceConfigTrait.php @@ -16,6 +16,7 @@ use Cake\Core\Exception\Exception; use Cake\Utility\Hash; +use InvalidArgumentException; /** * A trait for reading and writing instance config @@ -24,7 +25,6 @@ */ trait InstanceConfigTrait { - /** * Runtime config * @@ -110,8 +110,8 @@ public function setConfig($key, $value = null, $merge = true) * ``` * * @param string|null $key The key to get or null for the whole config. - * @param mixed $default The return value when the key does not exist. - * @return mixed Configuration data at the named key or null if the key does not exist. + * @param mixed|null $default The return value when the key does not exist. + * @return mixed|null Configuration data at the named key or null if the key does not exist. */ public function getConfig($key = null, $default = null) { @@ -187,6 +187,29 @@ public function config($key = null, $value = null, $merge = true) return $this->getConfig($key); } + /** + * Returns the config for this specific key. + * + * The config value for this key must exist, it can never be null. + * + * @param string|null $key The key to get. + * @return mixed Configuration data at the named key + * @throws \InvalidArgumentException + */ + public function getConfigOrFail($key) + { + if (!isset($key)) { + throw new InvalidArgumentException('$key must not be null.'); + } + + $config = $this->getConfig($key); + if ($config === null) { + throw new InvalidArgumentException(sprintf('Expected configuration `%s` not found.', $key)); + } + + return $config; + } + /** * Merge provided config with existing config. Unlike `config()` which does * a recursive merge for nested keys, this method does a simple merge. diff --git a/app/vendor/cakephp/cakephp/src/Core/ObjectRegistry.php b/app/vendor/cakephp/cakephp/src/Core/ObjectRegistry.php index 1a85a0abe..dda5d9a45 100644 --- a/app/vendor/cakephp/cakephp/src/Core/ObjectRegistry.php +++ b/app/vendor/cakephp/cakephp/src/Core/ObjectRegistry.php @@ -39,7 +39,6 @@ */ abstract class ObjectRegistry implements Countable, IteratorAggregate { - /** * Map of loaded objects. * @@ -156,7 +155,7 @@ protected function _checkDuplicate($name, $config) * Should resolve the classname for a given object type. * * @param string $class The class to resolve. - * @return string|bool The resolved name or false for failure. + * @return string|false The resolved name or false for failure. */ abstract protected function _resolveClassName($class); @@ -164,7 +163,7 @@ abstract protected function _resolveClassName($class); * Throw an exception when the requested object name is missing. * * @param string $class The class that is missing. - * @param string $plugin The plugin $class is missing from. + * @param string|null $plugin The plugin $class is missing from. * @return void * @throws \Exception */ diff --git a/app/vendor/cakephp/cakephp/src/Core/Plugin.php b/app/vendor/cakephp/cakephp/src/Core/Plugin.php index 2068d37bb..576835306 100644 --- a/app/vendor/cakephp/cakephp/src/Core/Plugin.php +++ b/app/vendor/cakephp/cakephp/src/Core/Plugin.php @@ -22,11 +22,10 @@ * * It also can retrieve plugin paths and load their bootstrap and routes files. * - * @link https://book.cakephp.org/3.0/en/plugins.html + * @link https://book.cakephp.org/3/en/plugins.html */ class Plugin { - /** * Holds a list of all loaded plugins and their configuration * @@ -134,7 +133,7 @@ public static function load($plugin, array $config = []) 'console' => true, 'classBase' => 'src', 'ignoreMissing' => false, - 'name' => $plugin + 'name' => $plugin, ]; if (!isset($config['path'])) { @@ -247,7 +246,7 @@ public static function path($name) * Returns the filesystem path for plugin's folder containing class folders. * * @param string $name name of the plugin in CamelCase format. - * @return string Path to the plugin folder container class folders. + * @return string Path to the plugin folder containing class files. * @throws \Cake\Core\Exception\MissingPluginException If plugin has not been loaded. */ public static function classPath($name) @@ -261,7 +260,7 @@ public static function classPath($name) * Returns the filesystem path for plugin's folder containing config files. * * @param string $name name of the plugin in CamelCase format. - * @return string Path to the plugin folder container config files. + * @return string Path to the plugin folder containing config files. * @throws \Cake\Core\Exception\MissingPluginException If plugin has not been loaded. */ public static function configPath($name) @@ -303,7 +302,7 @@ public static function bootstrap($name) * Loads the routes file for a plugin, or all plugins configured to load their respective routes file. * * If you need fine grained control over how routes are loaded for plugins, you - * can use {@see Cake\Routing\RouteBuilder::loadPlugin()} + * can use {@see \Cake\Routing\RouteBuilder::loadPlugin()} * * @param string|null $name name of the plugin, if null will operate on all * plugins having enabled the loading of routes files. @@ -315,7 +314,7 @@ public static function routes($name = null) { deprecationWarning( 'You no longer need to call `Plugin::routes()` after upgrading to use Http\Server. ' . - 'See https://book.cakephp.org/3.0/en/development/application.html#adding-the-new-http-stack-to-an-existing-application ' . + 'See https://book.cakephp.org/3/en/development/application.html#adding-the-new-http-stack-to-an-existing-application ' . 'for upgrade information.' ); if ($name === null) { diff --git a/app/vendor/cakephp/cakephp/src/Core/PluginCollection.php b/app/vendor/cakephp/cakephp/src/Core/PluginCollection.php index 351dee105..03a3e8174 100644 --- a/app/vendor/cakephp/cakephp/src/Core/PluginCollection.php +++ b/app/vendor/cakephp/cakephp/src/Core/PluginCollection.php @@ -44,7 +44,7 @@ class PluginCollection implements Iterator, Countable /** * Names of plugins * - * @var array + * @var string[] */ protected $names = []; diff --git a/app/vendor/cakephp/cakephp/src/Core/PluginInterface.php b/app/vendor/cakephp/cakephp/src/Core/PluginInterface.php index 3f4bd214f..8b3c260da 100644 --- a/app/vendor/cakephp/cakephp/src/Core/PluginInterface.php +++ b/app/vendor/cakephp/cakephp/src/Core/PluginInterface.php @@ -19,6 +19,8 @@ interface PluginInterface { /** * List of valid hooks. + * + * @var string[] */ const VALID_HOOKS = ['routes', 'bootstrap', 'console', 'middleware']; diff --git a/app/vendor/cakephp/cakephp/src/Core/README.md b/app/vendor/cakephp/cakephp/src/Core/README.md index ca10e4f62..c9984d9f7 100644 --- a/app/vendor/cakephp/cakephp/src/Core/README.md +++ b/app/vendor/cakephp/cakephp/src/Core/README.md @@ -26,7 +26,7 @@ Configure::load('app', 'default', false); Configure::load('other_config', 'default'); ``` -And Write the configuration back into files: +And write the configuration back into files: ```php Configure::dump('my_config', 'default'); @@ -34,4 +34,4 @@ Configure::dump('my_config', 'default'); ## Documentation -Please make sure you check the [official documentation](https://book.cakephp.org/3.0/en/development/configuration.html) +Please make sure you check the [official documentation](https://book.cakephp.org/3/en/development/configuration.html) diff --git a/app/vendor/cakephp/cakephp/src/Core/Retry/CommandRetry.php b/app/vendor/cakephp/cakephp/src/Core/Retry/CommandRetry.php index 572f87f87..e41431374 100644 --- a/app/vendor/cakephp/cakephp/src/Core/Retry/CommandRetry.php +++ b/app/vendor/cakephp/cakephp/src/Core/Retry/CommandRetry.php @@ -24,7 +24,6 @@ */ class CommandRetry { - /** * The strategy to follow should the executed action fail. * diff --git a/app/vendor/cakephp/cakephp/src/Core/Retry/RetryStrategyInterface.php b/app/vendor/cakephp/cakephp/src/Core/Retry/RetryStrategyInterface.php index 2e0f95380..107d888d0 100644 --- a/app/vendor/cakephp/cakephp/src/Core/Retry/RetryStrategyInterface.php +++ b/app/vendor/cakephp/cakephp/src/Core/Retry/RetryStrategyInterface.php @@ -25,7 +25,7 @@ interface RetryStrategyInterface /** * Returns true if the action can be retried, false otherwise. * - * @param Exception $exception The exception that caused the action to fail + * @param \Exception $exception The exception that caused the action to fail * @param int $retryCount The number of times the action has been already called * @return bool Whether or not it is OK to retry the action */ diff --git a/app/vendor/cakephp/cakephp/src/Core/StaticConfigTrait.php b/app/vendor/cakephp/cakephp/src/Core/StaticConfigTrait.php index e06f61450..addc2d3c0 100644 --- a/app/vendor/cakephp/cakephp/src/Core/StaticConfigTrait.php +++ b/app/vendor/cakephp/cakephp/src/Core/StaticConfigTrait.php @@ -24,10 +24,11 @@ * configuration data registered and manipulated. * * Implementing objects are expected to declare a static `$_dsnClassMap` property. + * + * @property \Cake\Core\ObjectRegistry $_registry */ trait StaticConfigTrait { - /** * Configuration sets. * @@ -67,7 +68,7 @@ trait StaticConfigTrait * ``` * * @param string|array $key The name of the configuration, or an array of multiple configs. - * @param array $config An array of name => configuration data for adapter. + * @param array|object|null $config An array of name => configuration data for adapter. * @throws \BadMethodCallException When trying to modify an existing config. * @throws \LogicException When trying to store an invalid structured config array. * @return void @@ -110,7 +111,7 @@ public static function setConfig($key, $config = null) * Reads existing configuration. * * @param string $key The name of the configuration. - * @return mixed Configuration data at the named key or null if the key does not exist. + * @return mixed|null Configuration data at the named key or null if the key does not exist. */ public static function getConfig($key) { @@ -177,6 +178,27 @@ public static function config($key, $config = null) return static::getConfig($key); } + /** + * Reads existing configuration for a specific key. + * + * The config value for this key must exist, it can never be null. + * + * @param string|null $key The name of the configuration. + * @return mixed Configuration data at the named key. + * @throws \InvalidArgumentException If value does not exist. + */ + public static function getConfigOrFail($key) + { + if (!isset($key)) { + throw new InvalidArgumentException('$key must not be null.'); + } + if (!isset(static::$_config[$key])) { + throw new InvalidArgumentException(sprintf('Expected configuration `%s` not found.', $key)); + } + + return static::$_config[$key]; + } + /** * Drops a constructed adapter. * @@ -340,7 +362,7 @@ public static function parseDsn($dsn) /** * Updates the DSN class map for this class. * - * @param array $map Additions/edits to the class map to apply. + * @param string[] $map Additions/edits to the class map to apply. * @return void */ public static function setDsnClassMap(array $map) @@ -351,7 +373,7 @@ public static function setDsnClassMap(array $map) /** * Returns the DSN class map for this class. * - * @return array + * @return string[] */ public static function getDsnClassMap() { @@ -362,8 +384,8 @@ public static function getDsnClassMap() * Returns or updates the DSN class map for this class. * * @deprecated 3.4.0 Use setDsnClassMap()/getDsnClassMap() instead. - * @param array|null $map Additions/edits to the class map to apply. - * @return array + * @param string[]|null $map Additions/edits to the class map to apply. + * @return string[] */ public static function dsnClassMap(array $map = null) { diff --git a/app/vendor/cakephp/cakephp/src/Core/composer.json b/app/vendor/cakephp/cakephp/src/Core/composer.json index 0ee9afc93..815c276e7 100644 --- a/app/vendor/cakephp/cakephp/src/Core/composer.json +++ b/app/vendor/cakephp/cakephp/src/Core/composer.json @@ -22,7 +22,7 @@ "source": "https://github.com/cakephp/core" }, "require": { - "php": ">=5.6.0", + "php": ">=5.6.0,<8.0.0", "cakephp/utility": "^3.6.0" }, "suggest": { diff --git a/app/vendor/cakephp/cakephp/src/Core/functions.php b/app/vendor/cakephp/cakephp/src/Core/functions.php index 87573649f..a33a47dea 100644 --- a/app/vendor/cakephp/cakephp/src/Core/functions.php +++ b/app/vendor/cakephp/cakephp/src/Core/functions.php @@ -33,7 +33,7 @@ * @param string|null $charset Character set to use when escaping. Defaults to config value in `mb_internal_encoding()` * or 'UTF-8'. * @return mixed Wrapped text. - * @link https://book.cakephp.org/3.0/en/core-libraries/global-constants-and-functions.html#h + * @link https://book.cakephp.org/3/en/core-libraries/global-constants-and-functions.html#h */ function h($text, $double = true, $charset = null) { @@ -91,7 +91,7 @@ function h($text, $double = true, $charset = null) * @param bool $dotAppend Set to true if you want the plugin to have a '.' appended to it. * @param string|null $plugin Optional default plugin to use if no plugin is found. Defaults to null. * @return array Array with 2 indexes. 0 => plugin name, 1 => class name. - * @link https://book.cakephp.org/3.0/en/core-libraries/global-constants-and-functions.html#pluginSplit + * @link https://book.cakephp.org/3/en/core-libraries/global-constants-and-functions.html#pluginSplit */ function pluginSplit($name, $dotAppend = false, $plugin = null) { @@ -135,13 +135,13 @@ function namespaceSplit($class) * print_r() convenience function. * * In terminals this will act similar to using print_r() directly, when not run on cli - * print_r() will also wrap
 tags around the output of given variable. Similar to debug().
+     * print_r() will also wrap `
` tags around the output of given variable. Similar to debug().
      *
      * This function returns the same variable that was passed.
      *
      * @param mixed $var Variable to print out.
      * @return mixed the same $var that was passed to this function
-     * @link https://book.cakephp.org/3.0/en/core-libraries/global-constants-and-functions.html#pr
+     * @link https://book.cakephp.org/3/en/core-libraries/global-constants-and-functions.html#pr
      * @see debug()
      */
     function pr($var)
@@ -163,14 +163,14 @@ function pr($var)
      * json pretty print convenience function.
      *
      * In terminals this will act similar to using json_encode() with JSON_PRETTY_PRINT directly, when not run on cli
-     * will also wrap 
 tags around the output of given variable. Similar to pr().
+     * will also wrap `
` tags around the output of given variable. Similar to pr().
      *
      * This function returns the same variable that was passed.
      *
      * @param mixed $var Variable to print out.
      * @return mixed the same $var that was passed to this function
      * @see pr()
-     * @link https://book.cakephp.org/3.0/en/core-libraries/global-constants-and-functions.html#pj
+     * @link https://book.cakephp.org/3/en/core-libraries/global-constants-and-functions.html#pj
      */
     function pj($var)
     {
@@ -179,7 +179,7 @@ function pj($var)
         }
 
         $template = (PHP_SAPI !== 'cli' && PHP_SAPI !== 'phpdbg') ? '
%s
' : "\n%s\n\n"; - printf($template, trim(json_encode($var, JSON_PRETTY_PRINT))); + printf($template, trim(json_encode($var, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES))); return $var; } @@ -194,9 +194,9 @@ function pj($var) * environment information. * * @param string $key Environment variable name. - * @param string|null $default Specify a default value in case the environment variable is not defined. + * @param string|bool|null $default Specify a default value in case the environment variable is not defined. * @return string|bool|null Environment variable setting. - * @link https://book.cakephp.org/3.0/en/core-libraries/global-constants-and-functions.html#env + * @link https://book.cakephp.org/3/en/core-libraries/global-constants-and-functions.html#env */ function env($key, $default = null) { diff --git a/app/vendor/cakephp/cakephp/src/Database/Connection.php b/app/vendor/cakephp/cakephp/src/Database/Connection.php index 313ca5e71..cd06f05d5 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Connection.php +++ b/app/vendor/cakephp/cakephp/src/Database/Connection.php @@ -29,13 +29,13 @@ use Cake\Datasource\ConnectionInterface; use Cake\Log\Log; use Exception; +use Throwable; /** * Represents a connection with a database server. */ class Connection implements ConnectionInterface { - use TypeConverterTrait; /** @@ -107,7 +107,15 @@ class Connection implements ConnectionInterface /** * Constructor. * - * @param array $config configuration for connecting to database + * ### Available options: + * - `driver` Sort name or FCQN for driver. + * - `log` Boolean indicating whether to use query logging. + * - `name` Connection name. + * - `cacheMetaData` Boolean indicating whether metadata (datasource schemas) should be cached. + * If set to a string it will be used as the name of cache config to use. + * - `cacheKeyPrefix` Custom prefix to use when generation cache keys. Defaults to connection name. + * + * @param array $config Configuration array. */ public function __construct($config) { @@ -576,13 +584,8 @@ public function rollback($toBeginning = null) /** * Enables/disables the usage of savepoints, enables only if driver the allows it. * - * If you are trying to enable this feature, make sure you check the return value of this - * function to verify it was enabled successfully. - * - * ### Example: - * - * `$connection->enableSavePoints(true)` Returns true if drivers supports save points, false otherwise - * `$connection->enableSavePoints(false)` Disables usage of savepoints and returns false + * If you are trying to enable this feature, make sure you check + * `isSavePointsEnabled()` to verify that savepoints were enabled successfully. * * @param bool $enable Whether or not save points should be used. * @return $this @@ -654,7 +657,7 @@ public function useSavePoints($enable = null) /** * Creates a new save point for nested transactions. * - * @param string $name The save point name. + * @param string|int $name The save point name. * @return void */ public function createSavePoint($name) @@ -665,7 +668,7 @@ public function createSavePoint($name) /** * Releases a save point by its name. * - * @param string $name The save point name. + * @param string|int $name The save point name. * @return void */ public function releaseSavePoint($name) @@ -676,7 +679,7 @@ public function releaseSavePoint($name) /** * Rollback a save point by its name. * - * @param string $name The save point name. + * @param string|int $name The save point name. * @return void */ public function rollbackSavepoint($name) @@ -730,12 +733,15 @@ public function supportsDynamicConstraints() * }); * ``` */ - public function transactional(callable $callback) + public function transactional(callable $transaction) { $this->begin(); try { - $result = $callback($this); + $result = $transaction($this); + } catch (Throwable $e) { + $this->rollback(false); + throw $e; } catch (Exception $e) { $this->rollback(false); throw $e; @@ -778,13 +784,13 @@ protected function wasNestedTransactionRolledback() * }); * ``` */ - public function disableConstraints(callable $callback) + public function disableConstraints(callable $operation) { - return $this->getDisconnectRetry()->run(function () use ($callback) { + return $this->getDisconnectRetry()->run(function () use ($operation) { $this->disableForeignKeys(); try { - $result = $callback($this); + $result = $operation($this); } catch (Exception $e) { $this->enableForeignKeys(); throw $e; @@ -995,7 +1001,7 @@ public function __debugInfo() 'username' => '*****', 'host' => '*****', 'database' => '*****', - 'port' => '*****' + 'port' => '*****', ]; $replace = array_intersect_key($secrets, $this->_config); $config = $replace + $this->_config; @@ -1007,7 +1013,7 @@ public function __debugInfo() 'transactionStarted' => $this->_transactionStarted, 'useSavePoints' => $this->_useSavePoints, 'logQueries' => $this->_logQueries, - 'logger' => $this->_logger + 'logger' => $this->_logger, ]; } } diff --git a/app/vendor/cakephp/cakephp/src/Database/Dialect/MysqlDialectTrait.php b/app/vendor/cakephp/cakephp/src/Database/Dialect/MysqlDialectTrait.php index a6966903f..d7be5468a 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Dialect/MysqlDialectTrait.php +++ b/app/vendor/cakephp/cakephp/src/Database/Dialect/MysqlDialectTrait.php @@ -25,7 +25,6 @@ */ trait MysqlDialectTrait { - use SqlDialectTrait; /** diff --git a/app/vendor/cakephp/cakephp/src/Database/Dialect/PostgresDialectTrait.php b/app/vendor/cakephp/cakephp/src/Database/Dialect/PostgresDialectTrait.php index 8e5cb7edb..89d874fb9 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Dialect/PostgresDialectTrait.php +++ b/app/vendor/cakephp/cakephp/src/Database/Dialect/PostgresDialectTrait.php @@ -26,7 +26,6 @@ */ trait PostgresDialectTrait { - use SqlDialectTrait; /** @@ -88,7 +87,7 @@ protected function _expressionTranslators() $namespace = 'Cake\Database\Expression'; return [ - $namespace . '\FunctionExpression' => '_transformFunctionExpression' + $namespace . '\FunctionExpression' => '_transformFunctionExpression', ]; } diff --git a/app/vendor/cakephp/cakephp/src/Database/Dialect/SqliteDialectTrait.php b/app/vendor/cakephp/cakephp/src/Database/Dialect/SqliteDialectTrait.php index 173ed362c..c129c4893 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Dialect/SqliteDialectTrait.php +++ b/app/vendor/cakephp/cakephp/src/Database/Dialect/SqliteDialectTrait.php @@ -26,7 +26,6 @@ */ trait SqliteDialectTrait { - use SqlDialectTrait; use TupleComparisonTranslatorTrait; @@ -63,7 +62,7 @@ trait SqliteDialectTrait 'minute' => 'M', 'second' => 'S', 'week' => 'W', - 'year' => 'Y' + 'year' => 'Y', ]; /** @@ -78,7 +77,7 @@ protected function _expressionTranslators() return [ $namespace . '\FunctionExpression' => '_transformFunctionExpression', - $namespace . '\TupleComparison' => '_transformTupleComparison' + $namespace . '\TupleComparison' => '_transformTupleComparison', ]; } diff --git a/app/vendor/cakephp/cakephp/src/Database/Dialect/SqlserverDialectTrait.php b/app/vendor/cakephp/cakephp/src/Database/Dialect/SqlserverDialectTrait.php index a58161c08..54300fa39 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Dialect/SqlserverDialectTrait.php +++ b/app/vendor/cakephp/cakephp/src/Database/Dialect/SqlserverDialectTrait.php @@ -17,12 +17,12 @@ use Cake\Database\ExpressionInterface; use Cake\Database\Expression\FunctionExpression; use Cake\Database\Expression\OrderByExpression; +use Cake\Database\Expression\OrderClauseExpression; use Cake\Database\Expression\UnaryExpression; use Cake\Database\Query; use Cake\Database\Schema\SqlserverSchema; use Cake\Database\SqlDialectTrait; use Cake\Database\SqlserverCompiler; -use Cake\Database\ValueBinder; use PDO; /** @@ -33,7 +33,6 @@ */ trait SqlserverDialectTrait { - use SqlDialectTrait; use TupleComparisonTranslatorTrait; @@ -116,12 +115,14 @@ protected function _pagingSubquery($original, $limit, $offset) ->clause('order') ->iterateParts(function ($direction, $orderBy) use ($select, $order) { $key = $orderBy; - if (isset($select[$orderBy]) && + if ( + isset($select[$orderBy]) && $select[$orderBy] instanceof ExpressionInterface ) { - $key = $select[$orderBy]->sql(new ValueBinder()); + $order->add(new OrderClauseExpression($select[$orderBy], $direction)); + } else { + $order->add([$key => $direction]); } - $order->add([$key => $direction]); // Leave original order clause unchanged. return $orderBy; @@ -132,7 +133,7 @@ protected function _pagingSubquery($original, $limit, $offset) $query = clone $original; $query->select([ - '_cake_page_rownum_' => new UnaryExpression('ROW_NUMBER() OVER', $order) + '_cake_page_rownum_' => new UnaryExpression('ROW_NUMBER() OVER', $order), ])->limit(null) ->offset(null) ->order([], true); @@ -190,7 +191,7 @@ protected function _transformDistinct($original) ->setConjunction(' '); return [ - '_cake_distinct_pivot_' => $over + '_cake_distinct_pivot_' => $over, ]; }) ->limit(null) @@ -227,7 +228,7 @@ protected function _expressionTranslators() return [ $namespace . '\FunctionExpression' => '_transformFunctionExpression', - $namespace . '\TupleComparison' => '_transformTupleComparison' + $namespace . '\TupleComparison' => '_transformTupleComparison', ]; } @@ -380,7 +381,7 @@ public function newCompiler() */ public function disableForeignKeySQL() { - return 'EXEC sp_msforeachtable "ALTER TABLE ? NOCHECK CONSTRAINT all"'; + return 'EXEC sp_MSforeachtable "ALTER TABLE ? NOCHECK CONSTRAINT all"'; } /** @@ -388,6 +389,6 @@ public function disableForeignKeySQL() */ public function enableForeignKeySQL() { - return 'EXEC sp_msforeachtable "ALTER TABLE ? WITH CHECK CHECK CONSTRAINT all"'; + return 'EXEC sp_MSforeachtable "ALTER TABLE ? WITH CHECK CHECK CONSTRAINT all"'; } } diff --git a/app/vendor/cakephp/cakephp/src/Database/Dialect/TupleComparisonTranslatorTrait.php b/app/vendor/cakephp/cakephp/src/Database/Dialect/TupleComparisonTranslatorTrait.php index 6c383a0ca..39c3013de 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Dialect/TupleComparisonTranslatorTrait.php +++ b/app/vendor/cakephp/cakephp/src/Database/Dialect/TupleComparisonTranslatorTrait.php @@ -26,7 +26,6 @@ */ trait TupleComparisonTranslatorTrait { - /** * Receives a TupleExpression and changes it so that it conforms to this * SQL dialect. @@ -70,6 +69,13 @@ protected function _transformTupleComparison(TupleComparison $expression, $query return; } + $type = $expression->getType(); + if ($type) { + $typeMap = array_combine($fields, $type); + } else { + $typeMap = []; + } + $surrogate = $query->getConnection() ->newQuery() ->select($true); @@ -86,7 +92,7 @@ protected function _transformTupleComparison(TupleComparison $expression, $query } $conditions['OR'][] = $item; } - $surrogate->where($conditions); + $surrogate->where($conditions, $typeMap); $expression->setField($true); $expression->setValue($surrogate); diff --git a/app/vendor/cakephp/cakephp/src/Database/Driver.php b/app/vendor/cakephp/cakephp/src/Database/Driver.php index 73dab9ac3..a7c517b06 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Driver.php +++ b/app/vendor/cakephp/cakephp/src/Database/Driver.php @@ -15,6 +15,7 @@ namespace Cake\Database; use Cake\Database\Query; +use Cake\Database\Schema\TableSchema; use Cake\Database\Statement\PDOStatement; use InvalidArgumentException; use PDO; @@ -302,7 +303,8 @@ public function schemaValue($value) if (is_float($value)) { return str_replace(',', '.', (string)$value); } - if ((is_int($value) || $value === '0') || ( + if ( + (is_int($value) || $value === '0') || ( is_numeric($value) && strpos($value, ',') === false && $value[0] !== '0' && strpos($value, 'e') === false) ) { @@ -426,6 +428,23 @@ public function newCompiler() return new QueryCompiler(); } + /** + * Constructs new TableSchema. + * + * @param string $table The table name. + * @param array $columns The list of columns for the schema. + * @return \Cake\Database\Schema\TableSchemaInterface + */ + public function newTableSchema($table, array $columns = []) + { + $className = TableSchema::class; + if (isset($this->_config['tableSchema'])) { + $className = $this->_config['tableSchema']; + } + + return new $className($table, $columns); + } + /** * Destructor */ @@ -443,7 +462,7 @@ public function __destruct() public function __debugInfo() { return [ - 'connected' => $this->_connection !== null + 'connected' => $this->_connection !== null, ]; } } diff --git a/app/vendor/cakephp/cakephp/src/Database/Driver/Mysql.php b/app/vendor/cakephp/cakephp/src/Database/Driver/Mysql.php index c821a4925..154079b4d 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Driver/Mysql.php +++ b/app/vendor/cakephp/cakephp/src/Database/Driver/Mysql.php @@ -25,7 +25,6 @@ */ class Mysql extends Driver { - use MysqlDialectTrait; /** diff --git a/app/vendor/cakephp/cakephp/src/Database/Driver/PDODriverTrait.php b/app/vendor/cakephp/cakephp/src/Database/Driver/PDODriverTrait.php index 388bd70f2..033dd71cb 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Driver/PDODriverTrait.php +++ b/app/vendor/cakephp/cakephp/src/Database/Driver/PDODriverTrait.php @@ -26,7 +26,6 @@ */ trait PDODriverTrait { - /** * Instance of PDO. * @@ -59,7 +58,7 @@ protected function _connect($dsn, array $config) * If first argument is passed, it will set internal connection object or * result to the value passed * - * @param null|\PDO $connection The PDO connection instance. + * @param \PDO|null $connection The PDO connection instance. * @return \PDO connection object used internally */ public function connection($connection = null) diff --git a/app/vendor/cakephp/cakephp/src/Database/Driver/Postgres.php b/app/vendor/cakephp/cakephp/src/Database/Driver/Postgres.php index 393672ab9..52786bbdd 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Driver/Postgres.php +++ b/app/vendor/cakephp/cakephp/src/Database/Driver/Postgres.php @@ -23,7 +23,6 @@ */ class Postgres extends Driver { - use PostgresDialectTrait; /** @@ -59,7 +58,7 @@ public function connect() $config['flags'] += [ PDO::ATTR_PERSISTENT => $config['persistent'], PDO::ATTR_EMULATE_PREPARES => false, - PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, ]; if (empty($config['unix_socket'])) { $dsn = "pgsql:host={$config['host']};port={$config['port']};dbname={$config['database']}"; diff --git a/app/vendor/cakephp/cakephp/src/Database/Driver/Sqlite.php b/app/vendor/cakephp/cakephp/src/Database/Driver/Sqlite.php index e53078757..48367ba4a 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Driver/Sqlite.php +++ b/app/vendor/cakephp/cakephp/src/Database/Driver/Sqlite.php @@ -26,7 +26,6 @@ */ class Sqlite extends Driver { - use SqliteDialectTrait; /** @@ -61,7 +60,7 @@ public function connect() $config['flags'] += [ PDO::ATTR_PERSISTENT => $config['persistent'], PDO::ATTR_EMULATE_PREPARES => false, - PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, ]; $databaseExists = file_exists($config['database']); diff --git a/app/vendor/cakephp/cakephp/src/Database/Driver/Sqlserver.php b/app/vendor/cakephp/cakephp/src/Database/Driver/Sqlserver.php index cb04ef7ad..f9f40d65d 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Driver/Sqlserver.php +++ b/app/vendor/cakephp/cakephp/src/Database/Driver/Sqlserver.php @@ -25,7 +25,6 @@ */ class Sqlserver extends Driver { - use SqlserverDialectTrait; /** @@ -75,8 +74,7 @@ public function connect() } $config['flags'] += [ - PDO::ATTR_EMULATE_PREPARES => false, - PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, ]; if (!empty($config['encoding'])) { diff --git a/app/vendor/cakephp/cakephp/src/Database/DriverInterface.php b/app/vendor/cakephp/cakephp/src/Database/DriverInterface.php index 9316df18f..476a0593a 100644 --- a/app/vendor/cakephp/cakephp/src/Database/DriverInterface.php +++ b/app/vendor/cakephp/cakephp/src/Database/DriverInterface.php @@ -20,6 +20,7 @@ * Interface for database driver. * * @method $this disableAutoQuoting() + * @method \Cake\Database\Schema\TableSchemaInterface newTableSchema() */ interface DriverInterface { @@ -91,7 +92,7 @@ public function rollbackTransaction(); /** * Get the SQL for releasing a save point. * - * @param string $name The table name. + * @param string|int $name The table name. * @return string */ public function releaseSavePointSQL($name); @@ -99,7 +100,7 @@ public function releaseSavePointSQL($name); /** * Get the SQL for creating a save point. * - * @param string $name The table name. + * @param string|int $name The table name. * @return string */ public function savePointSQL($name); @@ -107,7 +108,7 @@ public function savePointSQL($name); /** * Get the SQL for rollingback a save point. * - * @param string $name The table name. + * @param string|int $name The table name. * @return string */ public function rollbackSavePointSQL($name); @@ -130,7 +131,7 @@ public function enableForeignKeySQL(); * Returns whether the driver supports adding or dropping constraints * to already created tables. * - * @return bool true if driver supports dynamic constraints. + * @return bool True if driver supports dynamic constraints. */ public function supportsDynamicConstraints(); @@ -145,7 +146,7 @@ public function supportsSavePoints(); * Returns a value in a safe representation to be used in a query string * * @param mixed $value The value to quote. - * @param string $type Type to be used for determining kind of quoting to perform. + * @param int $type Type to be used for determining kind of quoting to perform. * @return string */ public function quote($value, $type); diff --git a/app/vendor/cakephp/cakephp/src/Database/Exception.php b/app/vendor/cakephp/cakephp/src/Database/Exception.php index c61d87d75..a89c3eac9 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Exception.php +++ b/app/vendor/cakephp/cakephp/src/Database/Exception.php @@ -21,5 +21,4 @@ */ class Exception extends CakeException { - } diff --git a/app/vendor/cakephp/cakephp/src/Database/Exception/MissingConnectionException.php b/app/vendor/cakephp/cakephp/src/Database/Exception/MissingConnectionException.php index 063830561..0a71dd0a7 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Exception/MissingConnectionException.php +++ b/app/vendor/cakephp/cakephp/src/Database/Exception/MissingConnectionException.php @@ -21,7 +21,6 @@ */ class MissingConnectionException extends Exception { - /** * {@inheritDoc} */ diff --git a/app/vendor/cakephp/cakephp/src/Database/Exception/MissingDriverException.php b/app/vendor/cakephp/cakephp/src/Database/Exception/MissingDriverException.php index bca5eb086..f97e7c464 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Exception/MissingDriverException.php +++ b/app/vendor/cakephp/cakephp/src/Database/Exception/MissingDriverException.php @@ -21,7 +21,6 @@ */ class MissingDriverException extends Exception { - /** * {@inheritDoc} */ diff --git a/app/vendor/cakephp/cakephp/src/Database/Exception/MissingExtensionException.php b/app/vendor/cakephp/cakephp/src/Database/Exception/MissingExtensionException.php index 729c0a0de..9c6002aba 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Exception/MissingExtensionException.php +++ b/app/vendor/cakephp/cakephp/src/Database/Exception/MissingExtensionException.php @@ -21,7 +21,6 @@ */ class MissingExtensionException extends Exception { - /** * {@inheritDoc} */ diff --git a/app/vendor/cakephp/cakephp/src/Database/Exception/NestedTransactionRollbackException.php b/app/vendor/cakephp/cakephp/src/Database/Exception/NestedTransactionRollbackException.php index f8915b51f..99053b609 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Exception/NestedTransactionRollbackException.php +++ b/app/vendor/cakephp/cakephp/src/Database/Exception/NestedTransactionRollbackException.php @@ -21,7 +21,6 @@ */ class NestedTransactionRollbackException extends Exception { - /** * Constructor * diff --git a/app/vendor/cakephp/cakephp/src/Database/Expression/BetweenExpression.php b/app/vendor/cakephp/cakephp/src/Database/Expression/BetweenExpression.php index b9e91f37c..f8cf3ebf3 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Expression/BetweenExpression.php +++ b/app/vendor/cakephp/cakephp/src/Database/Expression/BetweenExpression.php @@ -23,7 +23,6 @@ */ class BetweenExpression implements ExpressionInterface, FieldInterface { - use ExpressionTypeCasterTrait; use FieldTrait; @@ -79,7 +78,7 @@ public function sql(ValueBinder $generator) { $parts = [ 'from' => $this->_from, - 'to' => $this->_to + 'to' => $this->_to, ]; $field = $this->_field; @@ -100,13 +99,12 @@ public function sql(ValueBinder $generator) /** * {@inheritDoc} - * */ - public function traverse(callable $callable) + public function traverse(callable $visitor) { foreach ([$this->_field, $this->_from, $this->_to] as $part) { if ($part instanceof ExpressionInterface) { - $callable($part); + $visitor($part); } } } diff --git a/app/vendor/cakephp/cakephp/src/Database/Expression/CaseExpression.php b/app/vendor/cakephp/cakephp/src/Database/Expression/CaseExpression.php index b826c183e..8e36d2b6f 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Expression/CaseExpression.php +++ b/app/vendor/cakephp/cakephp/src/Database/Expression/CaseExpression.php @@ -23,7 +23,6 @@ */ class CaseExpression implements ExpressionInterface { - use ExpressionTypeCasterTrait; /** @@ -80,7 +79,6 @@ public function __construct($conditions = [], $values = [], $types = []) * @param array|\Cake\Database\ExpressionInterface $conditions Must be a ExpressionInterface instance, or an array of ExpressionInterface instances. * @param array|\Cake\Database\ExpressionInterface $values associative array of values of each condition * @param array $types associative array of types to be associated with the values - * * @return $this */ public function add($conditions = [], $values = [], $types = []) @@ -107,7 +105,6 @@ public function add($conditions = [], $values = [], $types = []) * @param array|\Cake\Database\ExpressionInterface $conditions Must be a ExpressionInterface instance, or an array of ExpressionInterface instances. * @param array|\Cake\Database\ExpressionInterface $values associative array of values of each condition * @param array $types associative array of types to be associated with the values - * * @return void */ protected function _addExpressions($conditions, $values, $types) @@ -161,7 +158,6 @@ protected function _addExpressions($conditions, $values, $types) * * @param \Cake\Database\ExpressionInterface|string|array|null $value Value to set * @param string|null $type Type of value - * * @return void */ public function elseValue($value = null, $type = null) @@ -187,7 +183,6 @@ public function elseValue($value = null, $type = null) * * @param array|string|\Cake\Database\ExpressionInterface $part The part to compile * @param \Cake\Database\ValueBinder $generator Sql generator - * * @return string */ protected function _compile($part, ValueBinder $generator) @@ -207,7 +202,6 @@ protected function _compile($part, ValueBinder $generator) * Converts the Node into a SQL string fragment. * * @param \Cake\Database\ValueBinder $generator Placeholder generator object - * * @return string */ public function sql(ValueBinder $generator) @@ -229,7 +223,6 @@ public function sql(ValueBinder $generator) /** * {@inheritDoc} - * */ public function traverse(callable $visitor) { diff --git a/app/vendor/cakephp/cakephp/src/Database/Expression/Comparison.php b/app/vendor/cakephp/cakephp/src/Database/Expression/Comparison.php index 751fc6b65..de0ad76c3 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Expression/Comparison.php +++ b/app/vendor/cakephp/cakephp/src/Database/Expression/Comparison.php @@ -26,7 +26,6 @@ */ class Comparison implements ExpressionInterface, FieldInterface { - use ExpressionTypeCasterTrait; use FieldTrait; @@ -71,7 +70,7 @@ class Comparison implements ExpressionInterface, FieldInterface * * @param string|\Cake\Database\ExpressionInterface $field the field name to compare to a value * @param mixed $value The value to be used in comparison - * @param string $type the type name used to cast the value + * @param string|null $type the type name used to cast the value * @param string $operator the operator used for comparing field and value */ public function __construct($field, $value, $type, $operator) @@ -165,23 +164,22 @@ public function sql(ValueBinder $generator) /** * {@inheritDoc} - * */ - public function traverse(callable $callable) + public function traverse(callable $visitor) { if ($this->_field instanceof ExpressionInterface) { - $callable($this->_field); - $this->_field->traverse($callable); + $visitor($this->_field); + $this->_field->traverse($visitor); } if ($this->_value instanceof ExpressionInterface) { - $callable($this->_value); - $this->_value->traverse($callable); + $visitor($this->_value); + $this->_value->traverse($visitor); } foreach ($this->_valueExpressions as $v) { - $callable($v); - $v->traverse($callable); + $visitor($v); + $v->traverse($visitor); } } diff --git a/app/vendor/cakephp/cakephp/src/Database/Expression/FieldInterface.php b/app/vendor/cakephp/cakephp/src/Database/Expression/FieldInterface.php index 36f753d14..35b2a588a 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Expression/FieldInterface.php +++ b/app/vendor/cakephp/cakephp/src/Database/Expression/FieldInterface.php @@ -20,7 +20,6 @@ */ interface FieldInterface { - /** * Sets the field name * diff --git a/app/vendor/cakephp/cakephp/src/Database/Expression/FieldTrait.php b/app/vendor/cakephp/cakephp/src/Database/Expression/FieldTrait.php index 42c842b0b..e418a0f18 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Expression/FieldTrait.php +++ b/app/vendor/cakephp/cakephp/src/Database/Expression/FieldTrait.php @@ -19,7 +19,6 @@ */ trait FieldTrait { - /** * The field name or expression to be used in the left hand side of the operator * diff --git a/app/vendor/cakephp/cakephp/src/Database/Expression/FunctionExpression.php b/app/vendor/cakephp/cakephp/src/Database/Expression/FunctionExpression.php index e569a369e..7cbe43954 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Expression/FunctionExpression.php +++ b/app/vendor/cakephp/cakephp/src/Database/Expression/FunctionExpression.php @@ -29,7 +29,6 @@ */ class FunctionExpression extends QueryExpression implements TypedResultInterface { - use ExpressionTypeCasterTrait; use TypedResultTrait; diff --git a/app/vendor/cakephp/cakephp/src/Database/Expression/IdentifierExpression.php b/app/vendor/cakephp/cakephp/src/Database/Expression/IdentifierExpression.php index 8aa9a209c..52fde3349 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Expression/IdentifierExpression.php +++ b/app/vendor/cakephp/cakephp/src/Database/Expression/IdentifierExpression.php @@ -27,7 +27,6 @@ */ class IdentifierExpression implements ExpressionInterface { - /** * Holds the identifier string * @@ -78,13 +77,9 @@ public function sql(ValueBinder $generator) } /** - * This method is a no-op, this is a leaf type of expression, - * hence there is nothing to traverse - * - * @param callable $callable The callable to traverse with. - * @return void + * @inheritDoc */ - public function traverse(callable $callable) + public function traverse(callable $visitor) { } } diff --git a/app/vendor/cakephp/cakephp/src/Database/Expression/OrderByExpression.php b/app/vendor/cakephp/cakephp/src/Database/Expression/OrderByExpression.php index 41a01cce9..98f16a76e 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Expression/OrderByExpression.php +++ b/app/vendor/cakephp/cakephp/src/Database/Expression/OrderByExpression.php @@ -22,7 +22,6 @@ */ class OrderByExpression extends QueryExpression { - /** * Constructor * diff --git a/app/vendor/cakephp/cakephp/src/Database/Expression/OrderClauseExpression.php b/app/vendor/cakephp/cakephp/src/Database/Expression/OrderClauseExpression.php index 11f04de03..8fc1c2c5b 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Expression/OrderClauseExpression.php +++ b/app/vendor/cakephp/cakephp/src/Database/Expression/OrderClauseExpression.php @@ -15,6 +15,7 @@ namespace Cake\Database\Expression; use Cake\Database\ExpressionInterface; +use Cake\Database\Query; use Cake\Database\ValueBinder; /** @@ -49,7 +50,9 @@ public function __construct($field, $direction) public function sql(ValueBinder $generator) { $field = $this->_field; - if ($field instanceof ExpressionInterface) { + if ($field instanceof Query) { + $field = sprintf('(%s)', $field->sql($generator)); + } elseif ($field instanceof ExpressionInterface) { $field = $field->sql($generator); } diff --git a/app/vendor/cakephp/cakephp/src/Database/Expression/QueryExpression.php b/app/vendor/cakephp/cakephp/src/Database/Expression/QueryExpression.php index 1ac6bdb9a..4ea417799 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Expression/QueryExpression.php +++ b/app/vendor/cakephp/cakephp/src/Database/Expression/QueryExpression.php @@ -31,7 +31,6 @@ */ class QueryExpression implements ExpressionInterface, Countable { - use TypeMapTrait; /** @@ -573,15 +572,15 @@ public function sql(ValueBinder $generator) * * Callback function receives as only argument an instance of ExpressionInterface * - * @param callable $callable The callable to apply to all sub-expressions. + * @param callable $visitor The callable to apply to all sub-expressions. * @return void */ - public function traverse(callable $callable) + public function traverse(callable $visitor) { foreach ($this->_conditions as $c) { if ($c instanceof ExpressionInterface) { - $callable($c); - $c->traverse($callable); + $visitor($c); + $c->traverse($visitor); } } } diff --git a/app/vendor/cakephp/cakephp/src/Database/Expression/TupleComparison.php b/app/vendor/cakephp/cakephp/src/Database/Expression/TupleComparison.php index 40ea6648f..101d8a680 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Expression/TupleComparison.php +++ b/app/vendor/cakephp/cakephp/src/Database/Expression/TupleComparison.php @@ -23,6 +23,12 @@ */ class TupleComparison extends Comparison { + /** + * The type to be used for casting the value to a database representation + * + * @var array + */ + protected $_type; /** * Constructor @@ -39,6 +45,16 @@ public function __construct($fields, $values, $types = [], $conjunction = '=') $this->_type = (array)$types; } + /** + * Returns the type to be used for casting the value to a database representation + * + * @return array + */ + public function getType() + { + return $this->_type; + } + /** * Convert the expression into a SQL fragment. * @@ -97,7 +113,7 @@ protected function _stringifyValues($generator) if ($isMulti) { $bound = []; foreach ($value as $k => $val) { - $valType = $multiType ? $type[$k] : $type; + $valType = $multiType && isset($type[$k]) ? $type[$k] : $type; $bound[] = $this->_bindValue($generator, $val, $valType); } @@ -135,19 +151,19 @@ protected function _bindValue($generator, $value, $type) * * Callback function receives as its only argument an instance of an ExpressionInterface * - * @param callable $callable The callable to apply to sub-expressions + * @param callable $visitor The callable to apply to sub-expressions * @return void */ - public function traverse(callable $callable) + public function traverse(callable $visitor) { foreach ($this->getField() as $field) { - $this->_traverseValue($field, $callable); + $this->_traverseValue($field, $visitor); } $value = $this->getValue(); if ($value instanceof ExpressionInterface) { - $callable($value); - $value->traverse($callable); + $visitor($value); + $value->traverse($visitor); return; } @@ -155,10 +171,10 @@ public function traverse(callable $callable) foreach ($value as $i => $val) { if ($this->isMulti()) { foreach ($val as $v) { - $this->_traverseValue($v, $callable); + $this->_traverseValue($v, $visitor); } } else { - $this->_traverseValue($val, $callable); + $this->_traverseValue($val, $visitor); } } } diff --git a/app/vendor/cakephp/cakephp/src/Database/Expression/UnaryExpression.php b/app/vendor/cakephp/cakephp/src/Database/Expression/UnaryExpression.php index f58fd675c..554e9a527 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Expression/UnaryExpression.php +++ b/app/vendor/cakephp/cakephp/src/Database/Expression/UnaryExpression.php @@ -22,16 +22,17 @@ */ class UnaryExpression implements ExpressionInterface { - /** * Indicates that the operation is in pre-order * + * @var int */ const PREFIX = 0; /** * Indicates that the operation is in post-order * + * @var int */ const POSTFIX = 1; @@ -92,13 +93,12 @@ public function sql(ValueBinder $generator) /** * {@inheritDoc} - * */ - public function traverse(callable $callable) + public function traverse(callable $visitor) { if ($this->_value instanceof ExpressionInterface) { - $callable($this->_value); - $this->_value->traverse($callable); + $visitor($this->_value); + $this->_value->traverse($visitor); } } diff --git a/app/vendor/cakephp/cakephp/src/Database/Expression/ValuesExpression.php b/app/vendor/cakephp/cakephp/src/Database/Expression/ValuesExpression.php index 261e512d5..389caa438 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Expression/ValuesExpression.php +++ b/app/vendor/cakephp/cakephp/src/Database/Expression/ValuesExpression.php @@ -29,7 +29,6 @@ */ class ValuesExpression implements ExpressionInterface { - use ExpressionTypeCasterTrait; use TypeMapTrait; @@ -84,7 +83,8 @@ public function __construct(array $columns, $typeMap) */ public function add($data) { - if ((count($this->_values) && $data instanceof Query) || + if ( + (count($this->_values) && $data instanceof Query) || ($this->_query && is_array($data)) ) { throw new Exception( @@ -376,7 +376,7 @@ protected function _processExpressions() foreach ($this->_values as $row => $values) { foreach ($types as $col => $type) { - /* @var \Cake\Database\Type\ExpressionTypeInterface $type */ + /** @var \Cake\Database\Type\ExpressionTypeInterface $type */ $this->_values[$row][$col] = $type->toExpression($values[$col]); } } diff --git a/app/vendor/cakephp/cakephp/src/Database/ExpressionInterface.php b/app/vendor/cakephp/cakephp/src/Database/ExpressionInterface.php index 57b6667db..1091fcaa3 100644 --- a/app/vendor/cakephp/cakephp/src/Database/ExpressionInterface.php +++ b/app/vendor/cakephp/cakephp/src/Database/ExpressionInterface.php @@ -19,7 +19,6 @@ */ interface ExpressionInterface { - /** * Converts the Node into a SQL string fragment. * diff --git a/app/vendor/cakephp/cakephp/src/Database/FieldTypeConverter.php b/app/vendor/cakephp/cakephp/src/Database/FieldTypeConverter.php index d1209adb5..fa453d0df 100644 --- a/app/vendor/cakephp/cakephp/src/Database/FieldTypeConverter.php +++ b/app/vendor/cakephp/cakephp/src/Database/FieldTypeConverter.php @@ -24,7 +24,6 @@ */ class FieldTypeConverter { - /** * An array containing the name of the fields and the Type objects * each should use when converting them. diff --git a/app/vendor/cakephp/cakephp/src/Database/FunctionsBuilder.php b/app/vendor/cakephp/cakephp/src/Database/FunctionsBuilder.php index 22a3b71e1..09fe941df 100644 --- a/app/vendor/cakephp/cakephp/src/Database/FunctionsBuilder.php +++ b/app/vendor/cakephp/cakephp/src/Database/FunctionsBuilder.php @@ -23,7 +23,6 @@ */ class FunctionsBuilder { - /** * Returns a new instance of a FunctionExpression. This is used for generating * arbitrary function calls in the final SQL string. @@ -44,7 +43,7 @@ protected function _build($name, $params = [], $types = [], $return = 'string') * argument. * * @param string $name name of the function to build - * @param mixed $expression the function argument + * @param string|\Cake\Database\ExpressionInterface $expression the function argument * @param array $types list of types to bind to the arguments * @param string $return The return type for the function * @return \Cake\Database\Expression\FunctionExpression @@ -73,7 +72,7 @@ public function rand() /** * Returns a FunctionExpression representing a call to SQL SUM function. * - * @param mixed $expression the function argument + * @param string|\Cake\Database\ExpressionInterface $expression the function argument * @param array $types list of types to bind to the arguments * @return \Cake\Database\Expression\FunctionExpression */ @@ -90,7 +89,7 @@ public function sum($expression, $types = []) /** * Returns a FunctionExpression representing a call to SQL AVG function. * - * @param mixed $expression the function argument + * @param string|\Cake\Database\ExpressionInterface $expression the function argument * @param array $types list of types to bind to the arguments * @return \Cake\Database\Expression\FunctionExpression */ @@ -102,7 +101,7 @@ public function avg($expression, $types = []) /** * Returns a FunctionExpression representing a call to SQL MAX function. * - * @param mixed $expression the function argument + * @param string|\Cake\Database\ExpressionInterface $expression the function argument * @param array $types list of types to bind to the arguments * @return \Cake\Database\Expression\FunctionExpression */ @@ -114,7 +113,7 @@ public function max($expression, $types = []) /** * Returns a FunctionExpression representing a call to SQL MIN function. * - * @param mixed $expression the function argument + * @param string|\Cake\Database\ExpressionInterface $expression the function argument * @param array $types list of types to bind to the arguments * @return \Cake\Database\Expression\FunctionExpression */ @@ -126,7 +125,7 @@ public function min($expression, $types = []) /** * Returns a FunctionExpression representing a call to SQL COUNT function. * - * @param mixed $expression the function argument + * @param string|\Cake\Database\ExpressionInterface $expression the function argument * @param array $types list of types to bind to the arguments * @return \Cake\Database\Expression\FunctionExpression */ @@ -159,6 +158,30 @@ public function coalesce($args, $types = []) return $this->_build('COALESCE', $args, $types, current($types) ?: 'string'); } + /** + * Returns a FunctionExpression representing a call to SQL CAST function. + * + * @param string|\Cake\Database\ExpressionInterface $field Field or expression to cast. + * @param string $type The target data type + * @return \Cake\Database\Expression\FunctionExpression + */ + public function cast($field, $type = '') + { + if (is_array($field)) { + deprecationWarning( + 'Build cast function by FunctionsBuilder::cast(array $args) is deprecated. ' . + 'Use FunctionsBuilder::cast($field, string $type) instead.' + ); + + return $this->_build('CAST', $field); + } + + $expression = $this->_literalArgumentFunction('CAST', $field); + $expression->setConjunction(' AS')->add([$type => 'literal']); + + return $expression; + } + /** * Returns a FunctionExpression representing the difference in days between * two dates. @@ -176,20 +199,20 @@ public function dateDiff($args, $types = []) * Returns the specified date part from the SQL expression. * * @param string $part Part of the date to return. - * @param string $expression Expression to obtain the date part from. + * @param string|\Cake\Database\ExpressionInterface $expression Expression to obtain the date part from. * @param array $types list of types to bind to the arguments * @return \Cake\Database\Expression\FunctionExpression */ public function datePart($part, $expression, $types = []) { - return $this->extract($part, $expression); + return $this->extract($part, $expression, $types); } /** * Returns the specified date part from the SQL expression. * * @param string $part Part of the date to return. - * @param string $expression Expression to obtain the date part from. + * @param string|\Cake\Database\ExpressionInterface $expression Expression to obtain the date part from. * @param array $types list of types to bind to the arguments * @return \Cake\Database\Expression\FunctionExpression */ @@ -204,8 +227,8 @@ public function extract($part, $expression, $types = []) /** * Add the time unit to the date expression * - * @param string $expression Expression to obtain the date part from. - * @param string $value Value to be added. Use negative to subtract. + * @param string|\Cake\Database\ExpressionInterface $expression Expression to obtain the date part from. + * @param string|int $value Value to be added. Use negative to subtract. * @param string $unit Unit of the value e.g. hour or day. * @param array $types list of types to bind to the arguments * @return \Cake\Database\Expression\FunctionExpression @@ -226,7 +249,7 @@ public function dateAdd($expression, $value, $unit, $types = []) * Returns a FunctionExpression representing a call to SQL WEEKDAY function. * 1 - Sunday, 2 - Monday, 3 - Tuesday... * - * @param mixed $expression the function argument + * @param string|\Cake\Database\ExpressionInterface $expression the function argument * @param array $types list of types to bind to the arguments * @return \Cake\Database\Expression\FunctionExpression */ @@ -239,7 +262,7 @@ public function dayOfWeek($expression, $types = []) * Returns a FunctionExpression representing a call to SQL WEEKDAY function. * 1 - Sunday, 2 - Monday, 3 - Tuesday... * - * @param mixed $expression the function argument + * @param string|\Cake\Database\ExpressionInterface $expression the function argument * @param array $types list of types to bind to the arguments * @return \Cake\Database\Expression\FunctionExpression */ diff --git a/app/vendor/cakephp/cakephp/src/Database/IdentifierQuoter.php b/app/vendor/cakephp/cakephp/src/Database/IdentifierQuoter.php index f5866e85c..e82695b22 100644 --- a/app/vendor/cakephp/cakephp/src/Database/IdentifierQuoter.php +++ b/app/vendor/cakephp/cakephp/src/Database/IdentifierQuoter.php @@ -25,7 +25,6 @@ */ class IdentifierQuoter { - /** * The driver instance used to do the identifier quoting * diff --git a/app/vendor/cakephp/cakephp/src/Database/Log/LoggedQuery.php b/app/vendor/cakephp/cakephp/src/Database/Log/LoggedQuery.php index 90c1b100d..b66328dd4 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Log/LoggedQuery.php +++ b/app/vendor/cakephp/cakephp/src/Database/Log/LoggedQuery.php @@ -22,7 +22,6 @@ */ class LoggedQuery { - /** * Query string that was executed * diff --git a/app/vendor/cakephp/cakephp/src/Database/Log/LoggingStatement.php b/app/vendor/cakephp/cakephp/src/Database/Log/LoggingStatement.php index 2fd2dcd99..d38c0a622 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Log/LoggingStatement.php +++ b/app/vendor/cakephp/cakephp/src/Database/Log/LoggingStatement.php @@ -24,7 +24,6 @@ */ class LoggingStatement extends StatementDecorator { - /** * Logger instance responsible for actually doing the logging task * diff --git a/app/vendor/cakephp/cakephp/src/Database/Log/QueryLogger.php b/app/vendor/cakephp/cakephp/src/Database/Log/QueryLogger.php index c80669e93..198f2300b 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Log/QueryLogger.php +++ b/app/vendor/cakephp/cakephp/src/Database/Log/QueryLogger.php @@ -24,7 +24,6 @@ */ class QueryLogger { - /** * Writes a LoggedQuery into a log * diff --git a/app/vendor/cakephp/cakephp/src/Database/Query.php b/app/vendor/cakephp/cakephp/src/Database/Query.php index de223a765..3a7945d38 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Query.php +++ b/app/vendor/cakephp/cakephp/src/Database/Query.php @@ -33,7 +33,6 @@ */ class Query implements ExpressionInterface, IteratorAggregate { - use TypeMapTrait; /** @@ -73,7 +72,7 @@ class Query implements ExpressionInterface, IteratorAggregate 'limit' => null, 'offset' => null, 'union' => [], - 'epilog' => null + 'epilog' => null, ]; /** @@ -676,7 +675,7 @@ public function removeJoin($name) * * See `join()` for further details on conditions and types. * - * @param string|string[] $table The table to join with + * @param string|string[]|\Cake\Database\ExpressionInterface[] $table The table to join with * @param string|array|\Cake\Database\ExpressionInterface $conditions The conditions * to use for joining. * @param array $types a list of types associated to the conditions used for converting @@ -696,7 +695,7 @@ public function leftJoin($table, $conditions = [], $types = []) * The arguments of this method are identical to the `leftJoin()` shorthand, please refer * to that methods description for further details. * - * @param string|array $table The table to join with + * @param string|string[]|\Cake\Database\ExpressionInterface[] $table The table to join with * @param string|array|\Cake\Database\ExpressionInterface $conditions The conditions * to use for joining. * @param array $types a list of types associated to the conditions used for converting @@ -716,7 +715,7 @@ public function rightJoin($table, $conditions = [], $types = []) * The arguments of this method are identical to the `leftJoin()` shorthand, please refer * to that methods description for further details. * - * @param string|string[] $table The table to join with + * @param string|string[]|\Cake\Database\ExpressionInterface[] $table The table to join with * @param string|array|\Cake\Database\ExpressionInterface $conditions The conditions * to use for joining. * @param array $types a list of types associated to the conditions used for converting @@ -731,7 +730,7 @@ public function innerJoin($table, $conditions = [], $types = []) /** * Returns an array that can be passed to the join method describing a single join clause * - * @param string|string[] $table The table to join with + * @param string|string[]|\Cake\Database\ExpressionInterface[] $table The table to join with * @param string|array|\Cake\Database\ExpressionInterface $conditions The conditions * to use for joining. * @param string $type the join type to use @@ -750,8 +749,8 @@ protected function _makeJoin($table, $conditions, $type) $alias => [ 'table' => $table, 'conditions' => $conditions, - 'type' => $type - ] + 'type' => $type, + ], ]; } @@ -840,8 +839,8 @@ protected function _makeJoin($table, $conditions, $type) * $query * ->where(['title !=' => 'Hello World']) * ->where(function ($exp, $query) { - * $or = $exp->or_(['id' => 1]); - * $and = $exp->and_(['id >' => 2, 'id <' => 10]); + * $or = $exp->or(['id' => 1]); + * $and = $exp->and(['id >' => 2, 'id <' => 10]); * return $or->add($and); * }); * ``` @@ -1026,7 +1025,7 @@ public function whereNotInList($field, array $values, array $options = []) * ->where(['title' => 'Foo']) * ->andWhere(function ($exp, $query) { * return $exp - * ->or_(['author_id' => 1]) + * ->or(['author_id' => 1]) * ->add(['author_id' => 2]); * }); * ``` @@ -1089,7 +1088,7 @@ public function andWhere($conditions, $types = []) * ->where(['title' => 'Foo']) * ->orWhere(function ($exp, $query) { * return $exp - * ->or_(['author_id' => 1]) + * ->or(['author_id' => 1]) * ->add(['author_id' => 2]); * }); * ``` @@ -1141,7 +1140,9 @@ public function orWhere($conditions, $types = []) * `ORDER BY title DESC, author_id ASC` * * ``` - * $query->order(['title' => 'DESC NULLS FIRST'])->order('author_id'); + * $query + * ->order(['title' => $query->newExpr('DESC NULLS FIRST')]) + * ->order('author_id'); * ``` * * Will generate: @@ -1203,7 +1204,7 @@ public function order($fields, $overwrite = false) * Order fields are not suitable for use with user supplied data as they are * not sanitized by the query builder. * - * @param string|\Cake\Database\Expression\QueryExpression $field The field to order on. + * @param string|\Cake\Database\Expression\QueryExpression|callable $field The field to order on. * @param bool $overwrite Whether or not to reset the order clauses. * @return $this */ @@ -1219,6 +1220,11 @@ public function orderAsc($field, $overwrite = false) if (!$this->_parts['order']) { $this->_parts['order'] = new OrderByExpression(); } + + if ($this->_parts['order']->isCallable($field)) { + $field = $field($this->newExpr(), $this); + } + $this->_parts['order']->add(new OrderClauseExpression($field, 'ASC')); return $this; @@ -1233,7 +1239,7 @@ public function orderAsc($field, $overwrite = false) * Order fields are not suitable for use with user supplied data as they are * not sanitized by the query builder. * - * @param string|\Cake\Database\Expression\QueryExpression $field The field to order on. + * @param string|\Cake\Database\Expression\QueryExpression|callable $field The field to order on. * @param bool $overwrite Whether or not to reset the order clauses. * @return $this */ @@ -1249,6 +1255,11 @@ public function orderDesc($field, $overwrite = false) if (!$this->_parts['order']) { $this->_parts['order'] = new OrderByExpression(); } + + if ($this->_parts['order']->isCallable($field)) { + $field = $field($this->newExpr(), $this); + } + $this->_parts['order']->add(new OrderClauseExpression($field, 'DESC')); return $this; @@ -1415,7 +1426,7 @@ public function page($num, $limit = null) * $query->limit($query->newExpr()->add(['1 + 1'])); // LIMIT (1 + 1) * ``` * - * @param int|\Cake\Database\ExpressionInterface $num number of records to be returned + * @param int|\Cake\Database\ExpressionInterface|null $num number of records to be returned * @return $this */ public function limit($num) @@ -1444,7 +1455,7 @@ public function limit($num) * $query->offset($query->newExpr()->add(['1 + 1'])); // OFFSET (1 + 1) * ``` * - * @param int|\Cake\Database\ExpressionInterface $num number of records to be skipped + * @param int|\Cake\Database\ExpressionInterface|null $num number of records to be skipped * @return $this */ public function offset($num) @@ -1489,7 +1500,7 @@ public function union($query, $overwrite = false) } $this->_parts['union'][] = [ 'all' => false, - 'query' => $query + 'query' => $query, ]; $this->_dirty(); @@ -1524,7 +1535,7 @@ public function unionAll($query, $overwrite = false) } $this->_parts['union'][] = [ 'all' => true, - 'query' => $query + 'query' => $query, ]; $this->_dirty(); @@ -1584,7 +1595,7 @@ public function into($table) * ### Example * * ``` - * $query->newExp()->lte('count', $query->identifier('total')); + * $query->newExpr()->lte('count', $query->identifier('total')); * ``` * * @param string $identifier The identifier for an expression @@ -1686,7 +1697,7 @@ public function update($table) * @param mixed $value The value to update $key to. Can be null if $key is an * array or QueryExpression. When $key is an array, this parameter will be * used as $types instead. - * @param array $types The column types to treat data as. + * @param array|string $types The column types to treat data as. * @return $this */ public function set($key, $value = null, $types = []) @@ -1751,7 +1762,7 @@ public function delete($table = null) * * Epliog content is raw SQL and not suitable for use with user supplied data. * - * @param string|\Cake\Database\Expression\QueryExpression|null $expression The expression to be appended + * @param string|\Cake\Database\ExpressionInterface|null $expression The expression to be appended * @return $this */ public function epilog($expression = null) @@ -2003,7 +2014,7 @@ public function getValueBinder() * associate values to those placeholders so that they can be passed correctly * to the statement object. * - * @param \Cake\Database\ValueBinder|bool $binder The binder or false to disable binding. + * @param \Cake\Database\ValueBinder|false $binder The binder or false to disable binding. * @return $this */ public function setValueBinder($binder) @@ -2229,7 +2240,7 @@ protected function _decorateStatement($statement) * Helper function used to build conditions by composing QueryExpression objects. * * @param string $part Name of the query part to append the new part to - * @param string|null|array|\Cake\Database\ExpressionInterface|callable $append Expression or builder function to append. + * @param string|array|\Cake\Database\ExpressionInterface|callable|null $append Expression or builder function to append. * @param string $conjunction type of conjunction to be used to operate part * @param array $types associative array of type names used to bind values to query * @return void @@ -2345,7 +2356,7 @@ public function __debugInfo() 'params' => $params, 'defaultTypes' => $this->getDefaultTypes(), 'decorators' => count($this->_resultDecorators), - 'executed' => $this->_iterator ? true : false + 'executed' => $this->_iterator ? true : false, ]; } } diff --git a/app/vendor/cakephp/cakephp/src/Database/QueryCompiler.php b/app/vendor/cakephp/cakephp/src/Database/QueryCompiler.php index 79f5c6791..d28ecefd7 100644 --- a/app/vendor/cakephp/cakephp/src/Database/QueryCompiler.php +++ b/app/vendor/cakephp/cakephp/src/Database/QueryCompiler.php @@ -23,7 +23,6 @@ */ class QueryCompiler { - /** * List of sprintf templates that will be used for compiling the SQL for * this query. There are some clauses that can be built as just as the @@ -39,7 +38,7 @@ class QueryCompiler 'order' => ' %s', 'limit' => ' LIMIT %s', 'offset' => ' OFFSET %s', - 'epilog' => ' %s' + 'epilog' => ' %s', ]; /** @@ -49,7 +48,7 @@ class QueryCompiler */ protected $_selectParts = [ 'select', 'from', 'join', 'where', 'group', 'having', 'order', 'limit', - 'offset', 'union', 'epilog' + 'offset', 'union', 'epilog', ]; /** @@ -125,7 +124,8 @@ public function compile(Query $query, ValueBinder $generator) protected function _sqlCompiler(&$sql, $query, $generator) { return function ($parts, $name) use (&$sql, $query, $generator) { - if (!isset($parts) || + if ( + !isset($parts) || ((is_array($parts) || $parts instanceof \Countable) && !count($parts)) ) { return; diff --git a/app/vendor/cakephp/cakephp/src/Database/README.md b/app/vendor/cakephp/cakephp/src/Database/README.md index c545e318d..e0add0b26 100644 --- a/app/vendor/cakephp/cakephp/src/Database/README.md +++ b/app/vendor/cakephp/cakephp/src/Database/README.md @@ -270,7 +270,7 @@ Combining expressions is also possible: ```php $query->where(function ($exp) { - $orConditions = $exp->or_(['author_id' => 2]) + $orConditions = $exp->or(['author_id' => 2]) ->eq('author_id', 5); return $exp ->not($orConditions) diff --git a/app/vendor/cakephp/cakephp/src/Database/Schema/BaseSchema.php b/app/vendor/cakephp/cakephp/src/Database/Schema/BaseSchema.php index 281c2208e..24098011b 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Schema/BaseSchema.php +++ b/app/vendor/cakephp/cakephp/src/Database/Schema/BaseSchema.php @@ -24,7 +24,6 @@ */ abstract class BaseSchema { - /** * The driver instance being used. * @@ -216,10 +215,10 @@ public function convertOptionsDescription(TableSchema $schema, $row) * Generate the SQL to create a table. * * @param \Cake\Database\Schema\TableSchema $schema Table instance. - * @param array $columns The columns to go inside the table. - * @param array $constraints The constraints for the table. - * @param array $indexes The indexes for the table. - * @return array SQL statements to create a table. + * @param string[] $columns The columns to go inside the table. + * @param string[] $constraints The constraints for the table. + * @param string[] $indexes The indexes for the table. + * @return string[] SQL statements to create a table. */ abstract public function createTableSql(TableSchema $schema, $columns, $constraints, $indexes); diff --git a/app/vendor/cakephp/cakephp/src/Database/Schema/CachedCollection.php b/app/vendor/cakephp/cakephp/src/Database/Schema/CachedCollection.php index 8ec484f02..1137167ea 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Schema/CachedCollection.php +++ b/app/vendor/cakephp/cakephp/src/Database/Schema/CachedCollection.php @@ -22,7 +22,6 @@ */ class CachedCollection extends Collection { - /** * The name of the cache config key to use for caching table metadata, * of false if disabled. @@ -45,7 +44,6 @@ public function __construct(ConnectionInterface $connection, $cacheKey = true) /** * {@inheritDoc} - * */ public function describe($name, array $options = []) { @@ -77,7 +75,13 @@ public function describe($name, array $options = []) */ public function cacheKey($name) { - return $this->_connection->configName() . '_' . $name; + $cachePrefix = $this->_connection->configName(); + $config = $this->_connection->config(); + if (isset($config['cacheKeyPrefix'])) { + $cachePrefix = $config['cacheKeyPrefix']; + } + + return $cachePrefix . '_' . $name; } /** diff --git a/app/vendor/cakephp/cakephp/src/Database/Schema/Collection.php b/app/vendor/cakephp/cakephp/src/Database/Schema/Collection.php index 0222e3c3d..65bccaf04 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Schema/Collection.php +++ b/app/vendor/cakephp/cakephp/src/Database/Schema/Collection.php @@ -26,7 +26,6 @@ */ class Collection { - /** * Connection object * @@ -55,7 +54,7 @@ public function __construct(Connection $connection) /** * Get the list of tables available in the current connection. * - * @return array The list of tables in the connected database/schema. + * @return string[] The list of tables in the connected database/schema. */ public function listTables() { @@ -94,7 +93,7 @@ public function describe($name, array $options = []) if (strpos($name, '.')) { list($config['schema'], $name) = explode('.', $name); } - $table = new TableSchema($name); + $table = $this->_connection->getDriver()->newTableSchema($name); $this->_reflect('Column', $name, $config, $table); if (count($table->columns()) === 0) { @@ -114,7 +113,7 @@ public function describe($name, array $options = []) * @param string $stage The stage name. * @param string $name The table name. * @param array $config The config data. - * @param \Cake\Database\Schema\TableSchema $schema The table instance + * @param \Cake\Database\Schema\TableSchemaInterface $schema The table schema instance. * @return void * @throws \Cake\Database\Exception on query failure. */ diff --git a/app/vendor/cakephp/cakephp/src/Database/Schema/MysqlSchema.php b/app/vendor/cakephp/cakephp/src/Database/Schema/MysqlSchema.php index ce1d95960..bee0d9eaa 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Schema/MysqlSchema.php +++ b/app/vendor/cakephp/cakephp/src/Database/Schema/MysqlSchema.php @@ -90,7 +90,7 @@ protected function _convertColumn($column) $col = strtolower($matches[1]); $length = $precision = null; - if (isset($matches[2])) { + if (isset($matches[2]) && strlen($matches[2])) { $length = $matches[2]; if (strpos($matches[2], ',') !== false) { list($length, $precision) = explode(',', $length); @@ -123,7 +123,7 @@ protected function _convertColumn($column) return ['type' => TableSchema::TYPE_UUID, 'length' => null]; } if ($col === 'char') { - return ['type' => TableSchema::TYPE_STRING, 'fixed' => true, 'length' => $length]; + return ['type' => TableSchema::TYPE_STRING, 'length' => $length, 'fixed' => true]; } if (strpos($col, 'char') !== false) { return ['type' => TableSchema::TYPE_STRING, 'length' => $length]; @@ -148,7 +148,7 @@ protected function _convertColumn($column) 'type' => TableSchema::TYPE_FLOAT, 'length' => $length, 'precision' => $precision, - 'unsigned' => $unsigned + 'unsigned' => $unsigned, ]; } if (strpos($col, 'decimal') !== false) { @@ -156,7 +156,7 @@ protected function _convertColumn($column) 'type' => TableSchema::TYPE_DECIMAL, 'length' => $length, 'precision' => $precision, - 'unsigned' => $unsigned + 'unsigned' => $unsigned, ]; } @@ -230,13 +230,13 @@ public function convertIndexDescription(TableSchema $schema, $row) $schema->addIndex($name, [ 'type' => $type, 'columns' => $columns, - 'length' => $length + 'length' => $length, ]); } else { $schema->addConstraint($name, [ 'type' => $type, 'columns' => $columns, - 'length' => $length + 'length' => $length, ]); } } @@ -326,7 +326,7 @@ public function columnSql(TableSchema $schema, $name) TableSchema::TYPE_DATETIME => ' DATETIME', TableSchema::TYPE_TIMESTAMP => ' TIMESTAMP', TableSchema::TYPE_UUID => ' CHAR(36)', - TableSchema::TYPE_JSON => $nativeJson ? ' JSON' : ' LONGTEXT' + TableSchema::TYPE_JSON => $nativeJson ? ' JSON' : ' LONGTEXT', ]; $specialMap = [ 'string' => true, @@ -382,17 +382,19 @@ public function columnSql(TableSchema $schema, $name) TableSchema::TYPE_INTEGER, TableSchema::TYPE_SMALLINTEGER, TableSchema::TYPE_TINYINTEGER, - TableSchema::TYPE_STRING + TableSchema::TYPE_STRING, ]; if (in_array($data['type'], $hasLength, true) && isset($data['length'])) { $out .= '(' . (int)$data['length'] . ')'; } $hasPrecision = [TableSchema::TYPE_FLOAT, TableSchema::TYPE_DECIMAL]; - if (in_array($data['type'], $hasPrecision, true) && - (isset($data['length']) || isset($data['precision'])) - ) { - $out .= '(' . (int)$data['length'] . ',' . (int)$data['precision'] . ')'; + if (in_array($data['type'], $hasPrecision, true) && isset($data['length'])) { + if (isset($data['precision'])) { + $out .= '(' . (int)$data['length'] . ',' . (int)$data['precision'] . ')'; + } else { + $out .= '(' . (int)$data['length'] . ')'; + } } $hasUnsigned = [ @@ -401,9 +403,10 @@ public function columnSql(TableSchema $schema, $name) TableSchema::TYPE_INTEGER, TableSchema::TYPE_BIGINTEGER, TableSchema::TYPE_FLOAT, - TableSchema::TYPE_DECIMAL + TableSchema::TYPE_DECIMAL, ]; - if (in_array($data['type'], $hasUnsigned, true) && + if ( + in_array($data['type'], $hasUnsigned, true) && isset($data['unsigned']) && $data['unsigned'] === true ) { $out .= ' UNSIGNED'; @@ -425,7 +428,8 @@ public function columnSql(TableSchema $schema, $name) !$schema->hasAutoincrement() && !isset($data['autoIncrement']) ); - if (in_array($data['type'], [TableSchema::TYPE_INTEGER, TableSchema::TYPE_BIGINTEGER]) && + if ( + in_array($data['type'], [TableSchema::TYPE_INTEGER, TableSchema::TYPE_BIGINTEGER]) && ($data['autoIncrement'] === true || $addAutoIncrement) ) { $out .= ' AUTO_INCREMENT'; @@ -434,7 +438,8 @@ public function columnSql(TableSchema $schema, $name) $out .= ' NULL'; unset($data['default']); } - if (isset($data['default']) && + if ( + isset($data['default']) && in_array($data['type'], [TableSchema::TYPE_TIMESTAMP, TableSchema::TYPE_DATETIME]) && in_array(strtolower($data['default']), ['current_timestamp', 'current_timestamp()']) ) { diff --git a/app/vendor/cakephp/cakephp/src/Database/Schema/PostgresSchema.php b/app/vendor/cakephp/cakephp/src/Database/Schema/PostgresSchema.php index 0d8ee340f..cb0da6dca 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Schema/PostgresSchema.php +++ b/app/vendor/cakephp/cakephp/src/Database/Schema/PostgresSchema.php @@ -22,7 +22,6 @@ */ class PostgresSchema extends BaseSchema { - /** * {@inheritDoc} */ @@ -116,7 +115,8 @@ protected function _convertColumn($column) } // money is 'string' as it includes arbitrary text content // before the number value. - if (strpos($col, 'char') !== false || + if ( + strpos($col, 'char') !== false || strpos($col, 'money') !== false ) { return ['type' => TableSchema::TYPE_STRING, 'length' => $length]; @@ -130,7 +130,8 @@ protected function _convertColumn($column) if ($col === 'real' || strpos($col, 'double') !== false) { return ['type' => TableSchema::TYPE_FLOAT, 'length' => null]; } - if (strpos($col, 'numeric') !== false || + if ( + strpos($col, 'numeric') !== false || strpos($col, 'decimal') !== false ) { return ['type' => TableSchema::TYPE_DECIMAL, 'length' => null]; @@ -166,7 +167,7 @@ public function convertColumnDescription(TableSchema $schema, $row) 'default' => $this->_defaultValue($row['default']), 'null' => $row['null'] === 'YES', 'collate' => $row['collation_name'], - 'comment' => $row['comment'] + 'comment' => $row['comment'], ]; $field['length'] = $row['char_length'] ?: $field['length']; @@ -258,7 +259,7 @@ public function convertIndexDescription(TableSchema $schema, $row) if (!$index) { $index = [ 'type' => $type, - 'columns' => [] + 'columns' => [], ]; } $index['columns'][] = $row['attname']; @@ -280,7 +281,7 @@ protected function _convertConstraint($schema, $name, $type, $row) if (!$constraint) { $constraint = [ 'type' => $type, - 'columns' => [] + 'columns' => [], ]; } $constraint['columns'][] = $row['attname']; @@ -367,7 +368,7 @@ public function columnSql(TableSchema $schema, $name) TableSchema::TYPE_DATETIME => ' TIMESTAMP', TableSchema::TYPE_TIMESTAMP => ' TIMESTAMP', TableSchema::TYPE_UUID => ' UUID', - TableSchema::TYPE_JSON => ' JSONB' + TableSchema::TYPE_JSON => ' JSONB', ]; if (isset($typeMap[$data['type']])) { @@ -390,7 +391,8 @@ public function columnSql(TableSchema $schema, $name) $out .= ' BYTEA'; } - if ($data['type'] === TableSchema::TYPE_STRING || + if ( + $data['type'] === TableSchema::TYPE_STRING || ($data['type'] === TableSchema::TYPE_TEXT && $data['length'] === TableSchema::LENGTH_TINY) ) { $isFixed = !empty($data['fixed']); @@ -413,7 +415,8 @@ public function columnSql(TableSchema $schema, $name) $out .= '(' . (int)$data['precision'] . ')'; } - if ($data['type'] === TableSchema::TYPE_DECIMAL && + if ( + $data['type'] === TableSchema::TYPE_DECIMAL && (isset($data['length']) || isset($data['precision'])) ) { $out .= '(' . (int)$data['length'] . ',' . (int)$data['precision'] . ')'; @@ -423,7 +426,8 @@ public function columnSql(TableSchema $schema, $name) $out .= ' NOT NULL'; } - if (isset($data['default']) && + if ( + isset($data['default']) && in_array($data['type'], [TableSchema::TYPE_TIMESTAMP, TableSchema::TYPE_DATETIME]) && strtolower($data['default']) === 'current_timestamp' ) { @@ -580,7 +584,7 @@ public function truncateTableSql(TableSchema $schema) $name = $this->_driver->quoteIdentifier($schema->name()); return [ - sprintf('TRUNCATE %s RESTART IDENTITY CASCADE', $name) + sprintf('TRUNCATE %s RESTART IDENTITY CASCADE', $name), ]; } diff --git a/app/vendor/cakephp/cakephp/src/Database/Schema/SqlGeneratorInterface.php b/app/vendor/cakephp/cakephp/src/Database/Schema/SqlGeneratorInterface.php index f71111dfa..847f7d822 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Schema/SqlGeneratorInterface.php +++ b/app/vendor/cakephp/cakephp/src/Database/Schema/SqlGeneratorInterface.php @@ -21,7 +21,6 @@ */ interface SqlGeneratorInterface { - /** * Generate the SQL to create the Table. * diff --git a/app/vendor/cakephp/cakephp/src/Database/Schema/SqliteSchema.php b/app/vendor/cakephp/cakephp/src/Database/Schema/SqliteSchema.php index 3384df6f4..425707c27 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Schema/SqliteSchema.php +++ b/app/vendor/cakephp/cakephp/src/Database/Schema/SqliteSchema.php @@ -22,7 +22,6 @@ */ class SqliteSchema extends BaseSchema { - /** * Array containing the foreign keys constraints names * Necessary for composite foreign keys to be handled @@ -61,9 +60,14 @@ protected function _convertColumn($column) } $col = strtolower($matches[2]); - $length = null; + $length = $precision = null; if (isset($matches[3])) { - $length = (int)$matches[3]; + $length = $matches[3]; + if (strpos($length, ',') !== false) { + list($length, $precision) = explode(',', $length); + } + $length = (int)$length; + $precision = (int)$precision; } if ($col === 'bigint') { @@ -79,10 +83,10 @@ protected function _convertColumn($column) return ['type' => TableSchema::TYPE_INTEGER, 'length' => $length, 'unsigned' => $unsigned]; } if (strpos($col, 'decimal') !== false) { - return ['type' => TableSchema::TYPE_DECIMAL, 'length' => null, 'unsigned' => $unsigned]; + return ['type' => TableSchema::TYPE_DECIMAL, 'length' => $length, 'precision' => $precision, 'unsigned' => $unsigned]; } if (in_array($col, ['float', 'real', 'double'])) { - return ['type' => TableSchema::TYPE_FLOAT, 'length' => null, 'unsigned' => $unsigned]; + return ['type' => TableSchema::TYPE_FLOAT, 'length' => $length, 'precision' => $precision, 'unsigned' => $unsigned]; } if (strpos($col, 'boolean') !== false) { @@ -120,7 +124,7 @@ public function listTablesSql($config) return [ 'SELECT name FROM sqlite_master WHERE type="table" ' . 'AND name != "sqlite_sequence" ORDER BY name', - [] + [], ]; } @@ -164,7 +168,7 @@ public function convertColumnDescription(TableSchema $schema, $row) if ($row['pk']) { $constraint = (array)$schema->getConstraint('primary') + [ 'type' => TableSchema::CONSTRAINT_PRIMARY, - 'columns' => [] + 'columns' => [], ]; $constraint['columns'] = array_merge($constraint['columns'], [$row['name']]); $schema->addConstraint('primary', $constraint); @@ -214,7 +218,6 @@ public function describeIndexSql($tableName, $config) * additional queries are done here. Sqlite constraint names are not * stable, and the names for constraints will not match those used to create * the table. This is a limitation in Sqlite's metadata features. - * */ public function convertIndexDescription(TableSchema $schema, $row) { @@ -232,12 +235,12 @@ public function convertIndexDescription(TableSchema $schema, $row) if ($row['unique']) { $schema->addConstraint($row['name'], [ 'type' => TableSchema::CONSTRAINT_UNIQUE, - 'columns' => $columns + 'columns' => $columns, ]); } else { $schema->addIndex($row['name'], [ 'type' => TableSchema::INDEX_INDEX, - 'columns' => $columns + 'columns' => $columns, ]); } } @@ -300,7 +303,7 @@ public function columnSql(TableSchema $schema, $name) TableSchema::TYPE_TIME => ' TIME', TableSchema::TYPE_DATETIME => ' DATETIME', TableSchema::TYPE_TIMESTAMP => ' TIMESTAMP', - TableSchema::TYPE_JSON => ' TEXT' + TableSchema::TYPE_JSON => ' TEXT', ]; $out = $this->_driver->quoteIdentifier($name); @@ -310,10 +313,11 @@ public function columnSql(TableSchema $schema, $name) TableSchema::TYPE_INTEGER, TableSchema::TYPE_BIGINTEGER, TableSchema::TYPE_FLOAT, - TableSchema::TYPE_DECIMAL + TableSchema::TYPE_DECIMAL, ]; - if (in_array($data['type'], $hasUnsigned, true) && + if ( + in_array($data['type'], $hasUnsigned, true) && isset($data['unsigned']) && $data['unsigned'] === true ) { if ($data['type'] !== TableSchema::TYPE_INTEGER || [$name] !== (array)$schema->primaryKey()) { @@ -329,7 +333,8 @@ public function columnSql(TableSchema $schema, $name) $out .= ' TEXT'; } - if ($data['type'] === TableSchema::TYPE_STRING || + if ( + $data['type'] === TableSchema::TYPE_STRING || ($data['type'] === TableSchema::TYPE_TEXT && $data['length'] === TableSchema::LENGTH_TINY) ) { $out .= ' VARCHAR'; @@ -352,14 +357,16 @@ public function columnSql(TableSchema $schema, $name) TableSchema::TYPE_SMALLINTEGER, TableSchema::TYPE_INTEGER, ]; - if (in_array($data['type'], $integerTypes, true) && + if ( + in_array($data['type'], $integerTypes, true) && isset($data['length']) && [$name] !== (array)$schema->primaryKey() ) { $out .= '(' . (int)$data['length'] . ')'; } $hasPrecision = [TableSchema::TYPE_FLOAT, TableSchema::TYPE_DECIMAL]; - if (in_array($data['type'], $hasPrecision, true) && + if ( + in_array($data['type'], $hasPrecision, true) && (isset($data['length']) || isset($data['precision'])) ) { $out .= '(' . (int)$data['length'] . ',' . (int)$data['precision'] . ')'; @@ -388,12 +395,12 @@ public function columnSql(TableSchema $schema, $name) * * Note integer primary keys will return ''. This is intentional as Sqlite requires * that integer primary keys be defined in the column definition. - * */ public function constraintSql(TableSchema $schema, $name) { $data = $schema->getConstraint($name); - if ($data['type'] === TableSchema::CONSTRAINT_PRIMARY && + if ( + $data['type'] === TableSchema::CONSTRAINT_PRIMARY && count($data['columns']) === 1 && $schema->getColumn($data['columns'][0])['type'] === TableSchema::TYPE_INTEGER ) { diff --git a/app/vendor/cakephp/cakephp/src/Database/Schema/SqlserverSchema.php b/app/vendor/cakephp/cakephp/src/Database/Schema/SqlserverSchema.php index 74bfc91e8..12f84d055 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Schema/SqlserverSchema.php +++ b/app/vendor/cakephp/cakephp/src/Database/Schema/SqlserverSchema.php @@ -19,7 +19,9 @@ */ class SqlserverSchema extends BaseSchema { - + /** + * @var string + */ const DEFAULT_SCHEMA_NAME = 'dbo'; /** @@ -81,9 +83,9 @@ public function describeColumnSql($tableName, $config) protected function _convertColumn($col, $length = null, $precision = null, $scale = null) { $col = strtolower($col); - $length = (int)$length; - $precision = (int)$precision; - $scale = (int)$scale; + $length = $length !== null ? (int)$length : $length; + $precision = $precision !== null ? (int)$precision : $precision; + $scale = $scale !== null ? (int)$scale : $scale; if (in_array($col, ['date', 'time'])) { return ['type' => $col, 'length' => null]; @@ -107,7 +109,8 @@ protected function _convertColumn($col, $length = null, $precision = null, $scal if ($col === 'bit') { return ['type' => TableSchema::TYPE_BOOLEAN, 'length' => null]; } - if (strpos($col, 'numeric') !== false || + if ( + strpos($col, 'numeric') !== false || strpos($col, 'money') !== false || strpos($col, 'decimal') !== false ) { @@ -139,6 +142,11 @@ protected function _convertColumn($col, $length = null, $precision = null, $scal } if ($col === 'image' || strpos($col, 'binary') !== false) { + // -1 is the value for MAX which we treat as a 'long' binary + if ($length == -1) { + $length = TableSchema::LENGTH_LONG; + } + return ['type' => TableSchema::TYPE_BINARY, 'length' => $length]; } @@ -253,14 +261,14 @@ public function convertIndexDescription(TableSchema $schema, $row) if ($type === TableSchema::CONSTRAINT_PRIMARY || $type === TableSchema::CONSTRAINT_UNIQUE) { $schema->addConstraint($name, [ 'type' => $type, - 'columns' => $columns + 'columns' => $columns, ]); return; } $schema->addIndex($name, [ 'type' => $type, - 'columns' => $columns + 'columns' => $columns, ]); } @@ -309,7 +317,7 @@ protected function _foreignOnClause($on) { $parent = parent::_foreignOnClause($on); - return $parent === 'RESTRICT' ? parent::_foreignOnClause(TableSchema::ACTION_SET_NULL) : $parent; + return $parent === 'RESTRICT' ? parent::_foreignOnClause(TableSchema::ACTION_NO_ACTION) : $parent; } /** @@ -371,8 +379,10 @@ public function columnSql(TableSchema $schema, $name) } if ($data['type'] === TableSchema::TYPE_BINARY) { - if (!isset($data['length']) - || in_array($data['length'], [TableSchema::LENGTH_MEDIUM, TableSchema::LENGTH_LONG], true)) { + if ( + !isset($data['length']) + || in_array($data['length'], [TableSchema::LENGTH_MEDIUM, TableSchema::LENGTH_LONG], true) + ) { $data['length'] = 'MAX'; } @@ -385,7 +395,8 @@ public function columnSql(TableSchema $schema, $name) } } - if ($data['type'] === TableSchema::TYPE_STRING || + if ( + $data['type'] === TableSchema::TYPE_STRING || ($data['type'] === TableSchema::TYPE_TEXT && $data['length'] === TableSchema::LENGTH_TINY) ) { $type = ' NVARCHAR'; @@ -410,7 +421,8 @@ public function columnSql(TableSchema $schema, $name) $out .= '(' . (int)$data['precision'] . ')'; } - if ($data['type'] === TableSchema::TYPE_DECIMAL && + if ( + $data['type'] === TableSchema::TYPE_DECIMAL && (isset($data['length']) || isset($data['precision'])) ) { $out .= '(' . (int)$data['length'] . ',' . (int)$data['precision'] . ')'; @@ -420,7 +432,8 @@ public function columnSql(TableSchema $schema, $name) $out .= ' NOT NULL'; } - if (isset($data['default']) && + if ( + isset($data['default']) && in_array($data['type'], [TableSchema::TYPE_TIMESTAMP, TableSchema::TYPE_DATETIME]) && strtolower($data['default']) === 'current_timestamp' ) { @@ -561,7 +574,7 @@ public function truncateTableSql(TableSchema $schema) { $name = $this->_driver->quoteIdentifier($schema->name()); $queries = [ - sprintf('DELETE FROM %s', $name) + sprintf('DELETE FROM %s', $name), ]; // Restart identity sequences diff --git a/app/vendor/cakephp/cakephp/src/Database/Schema/TableSchema.php b/app/vendor/cakephp/cakephp/src/Database/Schema/TableSchema.php index b2cfdae0a..289ee046a 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Schema/TableSchema.php +++ b/app/vendor/cakephp/cakephp/src/Database/Schema/TableSchema.php @@ -31,7 +31,6 @@ */ class TableSchema implements TableSchemaInterface, SqlGeneratorInterface { - /** * The name of the table * @@ -110,7 +109,7 @@ class TableSchema implements TableSchemaInterface, SqlGeneratorInterface public static $columnLengths = [ 'tiny' => self::LENGTH_TINY, 'medium' => self::LENGTH_MEDIUM, - 'long' => self::LENGTH_LONG + 'long' => self::LENGTH_LONG, ]; /** @@ -488,6 +487,7 @@ public function defaultValues() /** * {@inheritDoc} + * * @throws \Cake\Database\Exception */ public function addIndex($name, $attrs) @@ -573,6 +573,7 @@ public function primaryKey() /** * {@inheritDoc} + * * @throws \Cake\Database\Exception */ public function addConstraint($name, $attrs) diff --git a/app/vendor/cakephp/cakephp/src/Database/Schema/TableSchemaAwareInterface.php b/app/vendor/cakephp/cakephp/src/Database/Schema/TableSchemaAwareInterface.php index 7732b269b..e5f5ff806 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Schema/TableSchemaAwareInterface.php +++ b/app/vendor/cakephp/cakephp/src/Database/Schema/TableSchemaAwareInterface.php @@ -19,7 +19,6 @@ */ interface TableSchemaAwareInterface { - /** * Get and set the schema for this fixture. * diff --git a/app/vendor/cakephp/cakephp/src/Database/Schema/TableSchemaInterface.php b/app/vendor/cakephp/cakephp/src/Database/Schema/TableSchemaInterface.php index 8bb2c701b..41104dad2 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Schema/TableSchemaInterface.php +++ b/app/vendor/cakephp/cakephp/src/Database/Schema/TableSchemaInterface.php @@ -21,7 +21,6 @@ */ interface TableSchemaInterface extends SchemaInterface { - /** * Binary column type * diff --git a/app/vendor/cakephp/cakephp/src/Database/SchemaCache.php b/app/vendor/cakephp/cakephp/src/Database/SchemaCache.php index 5f6433fbf..b1d71a63e 100644 --- a/app/vendor/cakephp/cakephp/src/Database/SchemaCache.php +++ b/app/vendor/cakephp/cakephp/src/Database/SchemaCache.php @@ -16,6 +16,7 @@ use Cake\Cache\Cache; use Cake\Database\Connection; +use Cake\Log\Log; use RuntimeException; /** @@ -25,10 +26,11 @@ * can prevent thundering herd effects on the metadata cache when new * versions of your application are deployed, or when migrations * requiring updated metadata are required. + * + * @link https://en.wikipedia.org/wiki/Thundering_herd_problem About the thundering herd problem */ class SchemaCache { - /** * Schema * @@ -103,6 +105,7 @@ public function getSchema(Connection $connection) $config = $connection->config(); if (empty($config['cacheMetadata'])) { + Log::info(sprintf('Metadata cache was disabled in config for `%s`. Enabling to clear cache.', $connection->configName())); $connection->cacheMetadata(true); } diff --git a/app/vendor/cakephp/cakephp/src/Database/SqlDialectTrait.php b/app/vendor/cakephp/cakephp/src/Database/SqlDialectTrait.php index 182818c02..c0eda4f9d 100644 --- a/app/vendor/cakephp/cakephp/src/Database/SqlDialectTrait.php +++ b/app/vendor/cakephp/cakephp/src/Database/SqlDialectTrait.php @@ -15,13 +15,13 @@ namespace Cake\Database; use Cake\Database\Expression\Comparison; +use Cake\Database\Expression\IdentifierExpression; /** * Sql dialect trait */ trait SqlDialectTrait { - /** * Quotes a database identifier (a column name, table name, etc..) to * be used safely in queries without the risk of using reserved words @@ -222,20 +222,31 @@ protected function _removeAliasesFromConditions($query) $conditions = $query->clause('where'); if ($conditions) { - $conditions->traverse(function ($condition) { - if (!($condition instanceof Comparison)) { - return $condition; - } + $conditions->traverse(function ($expression) { + if ($expression instanceof Comparison) { + $field = $expression->getField(); + if ( + is_string($field) && + strpos($field, '.') !== false + ) { + list(, $unaliasedField) = explode('.', $field, 2); + $expression->setField($unaliasedField); + } - $field = $condition->getField(); - if ($field instanceof ExpressionInterface || strpos($field, '.') === false) { - return $condition; + return $expression; } - list(, $field) = explode('.', $field); - $condition->setField($field); + if ($expression instanceof IdentifierExpression) { + $identifier = $expression->getIdentifier(); + if (strpos($identifier, '.') !== false) { + list(, $unaliasedIdentifier) = explode('.', $identifier, 2); + $expression->setIdentifier($unaliasedIdentifier); + } + + return $expression; + } - return $condition; + return $expression; }); } diff --git a/app/vendor/cakephp/cakephp/src/Database/SqliteCompiler.php b/app/vendor/cakephp/cakephp/src/Database/SqliteCompiler.php index 5a9e54767..1c7fa949c 100644 --- a/app/vendor/cakephp/cakephp/src/Database/SqliteCompiler.php +++ b/app/vendor/cakephp/cakephp/src/Database/SqliteCompiler.php @@ -22,7 +22,6 @@ */ class SqliteCompiler extends QueryCompiler { - /** * SQLite does not support ORDER BY in UNION queries. * diff --git a/app/vendor/cakephp/cakephp/src/Database/SqlserverCompiler.php b/app/vendor/cakephp/cakephp/src/Database/SqlserverCompiler.php index 2f8c83d97..c2e3ec988 100644 --- a/app/vendor/cakephp/cakephp/src/Database/SqlserverCompiler.php +++ b/app/vendor/cakephp/cakephp/src/Database/SqlserverCompiler.php @@ -22,7 +22,6 @@ */ class SqlserverCompiler extends QueryCompiler { - /** * SQLserver does not support ORDER BY in UNION queries. * @@ -40,7 +39,7 @@ class SqlserverCompiler extends QueryCompiler 'having' => ' HAVING %s ', 'order' => ' %s', 'offset' => ' OFFSET %s ROWS', - 'epilog' => ' %s' + 'epilog' => ' %s', ]; /** @@ -48,7 +47,7 @@ class SqlserverCompiler extends QueryCompiler */ protected $_selectParts = [ 'select', 'from', 'join', 'where', 'group', 'having', 'order', 'offset', - 'limit', 'union', 'epilog' + 'limit', 'union', 'epilog', ]; /** diff --git a/app/vendor/cakephp/cakephp/src/Database/Statement/BufferResultsTrait.php b/app/vendor/cakephp/cakephp/src/Database/Statement/BufferResultsTrait.php index 0ad4c795f..c0c8fc2ff 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Statement/BufferResultsTrait.php +++ b/app/vendor/cakephp/cakephp/src/Database/Statement/BufferResultsTrait.php @@ -21,7 +21,6 @@ */ trait BufferResultsTrait { - /** * Whether or not to buffer results in php * diff --git a/app/vendor/cakephp/cakephp/src/Database/Statement/BufferedStatement.php b/app/vendor/cakephp/cakephp/src/Database/Statement/BufferedStatement.php index 17b819fe3..55b054e6e 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Statement/BufferedStatement.php +++ b/app/vendor/cakephp/cakephp/src/Database/Statement/BufferedStatement.php @@ -147,7 +147,10 @@ public function execute($params = null) } /** - * {@inheritDoc} + * Returns the value of the result at position. + * + * @param int $position The numeric position of the column to retrieve in the result + * @return mixed Returns the specific value of the column designated at $position */ public function fetchColumn($position) { @@ -189,7 +192,7 @@ public function lastInsertId($table = null, $column = null) /** * {@inheritDoc} * - * @param string $type The type to fetch. + * @param int|string $type The type to fetch. * @return array|false */ public function fetch($type = self::FETCH_TYPE_NUM) diff --git a/app/vendor/cakephp/cakephp/src/Database/Statement/CallbackStatement.php b/app/vendor/cakephp/cakephp/src/Database/Statement/CallbackStatement.php index b7035ff1e..714f05604 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Statement/CallbackStatement.php +++ b/app/vendor/cakephp/cakephp/src/Database/Statement/CallbackStatement.php @@ -22,7 +22,6 @@ */ class CallbackStatement extends StatementDecorator { - /** * A callback function to be applied to results. * @@ -48,7 +47,7 @@ public function __construct($statement, $driver, $callback) * * The result will be processed by the callback when it is not `false`. * - * @param string $type Either 'num' or 'assoc' to indicate the result format you would like. + * @param string|int $type Either 'num' or 'assoc' to indicate the result format you would like. * @return array|false */ public function fetch($type = parent::FETCH_TYPE_NUM) @@ -64,7 +63,7 @@ public function fetch($type = parent::FETCH_TYPE_NUM) * * Each row in the result will be processed by the callback when it is not `false. * - * @param string $type Either 'num' or 'assoc' to indicate the result format you would like. + * @param string|int $type Either 'num' or 'assoc' to indicate the result format you would like. * @return array */ public function fetchAll($type = parent::FETCH_TYPE_NUM) diff --git a/app/vendor/cakephp/cakephp/src/Database/Statement/MysqlStatement.php b/app/vendor/cakephp/cakephp/src/Database/Statement/MysqlStatement.php index 0f751945b..dc3fcbbed 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Statement/MysqlStatement.php +++ b/app/vendor/cakephp/cakephp/src/Database/Statement/MysqlStatement.php @@ -23,12 +23,10 @@ */ class MysqlStatement extends PDOStatement { - use BufferResultsTrait; /** * {@inheritDoc} - * */ public function execute($params = null) { diff --git a/app/vendor/cakephp/cakephp/src/Database/Statement/PDOStatement.php b/app/vendor/cakephp/cakephp/src/Database/Statement/PDOStatement.php index 4bf00f928..83e25ac16 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Statement/PDOStatement.php +++ b/app/vendor/cakephp/cakephp/src/Database/Statement/PDOStatement.php @@ -23,7 +23,6 @@ */ class PDOStatement extends StatementDecorator { - /** * Constructor * diff --git a/app/vendor/cakephp/cakephp/src/Database/Statement/SqliteStatement.php b/app/vendor/cakephp/cakephp/src/Database/Statement/SqliteStatement.php index 08e0b558b..8b9da2e7f 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Statement/SqliteStatement.php +++ b/app/vendor/cakephp/cakephp/src/Database/Statement/SqliteStatement.php @@ -21,12 +21,10 @@ */ class SqliteStatement extends StatementDecorator { - use BufferResultsTrait; /** * {@inheritDoc} - * */ public function execute($params = null) { diff --git a/app/vendor/cakephp/cakephp/src/Database/Statement/SqlserverStatement.php b/app/vendor/cakephp/cakephp/src/Database/Statement/SqlserverStatement.php index 5b1eb539d..c18694edc 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Statement/SqlserverStatement.php +++ b/app/vendor/cakephp/cakephp/src/Database/Statement/SqlserverStatement.php @@ -23,12 +23,11 @@ */ class SqlserverStatement extends PDOStatement { - /** + * {@inheritDoc} + * * The SQL Server PDO driver requires that binary parameters be bound with the SQLSRV_ENCODING_BINARY attribute. * This overrides the PDOStatement::bindValue method in order to bind binary columns using the required attribute. - * - * {@inheritDoc} */ public function bindValue($column, $value, $type = 'string') { diff --git a/app/vendor/cakephp/cakephp/src/Database/Type.php b/app/vendor/cakephp/cakephp/src/Database/Type.php index 24df3f6f1..7bfbb4ba5 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Type.php +++ b/app/vendor/cakephp/cakephp/src/Database/Type.php @@ -23,7 +23,6 @@ */ class Type implements TypeInterface { - /** * List of supported database types. A human readable * identifier is used as key and a complete namespaced class name as value @@ -63,7 +62,7 @@ class Type implements TypeInterface 'text' => ['callback' => [Type::class, 'strval']], 'boolean' => [ 'callback' => [Type::class, 'boolval'], - 'pdo' => PDO::PARAM_BOOL + 'pdo' => PDO::PARAM_BOOL, ], ]; diff --git a/app/vendor/cakephp/cakephp/src/Database/Type/BatchCastingInterface.php b/app/vendor/cakephp/cakephp/src/Database/Type/BatchCastingInterface.php index fe1d614a2..36d938094 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Type/BatchCastingInterface.php +++ b/app/vendor/cakephp/cakephp/src/Database/Type/BatchCastingInterface.php @@ -22,7 +22,6 @@ */ interface BatchCastingInterface { - /** * Returns an array of the values converted to the PHP representation of * this type. diff --git a/app/vendor/cakephp/cakephp/src/Database/Type/BinaryType.php b/app/vendor/cakephp/cakephp/src/Database/Type/BinaryType.php index bd27ede8a..a0c5d3ac0 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Type/BinaryType.php +++ b/app/vendor/cakephp/cakephp/src/Database/Type/BinaryType.php @@ -69,7 +69,7 @@ public function toDatabase($value, Driver $driver) /** * Convert binary into resource handles * - * @param null|string|resource $value The value to convert. + * @param resource|string|null $value The value to convert. * @param \Cake\Database\Driver $driver The driver instance to convert with. * @return resource|null * @throws \Cake\Core\Exception\Exception @@ -79,7 +79,8 @@ public function toPHP($value, Driver $driver) if ($value === null) { return null; } - if (is_string($value) + if ( + is_string($value) && $driver instanceof Sqlserver && version_compare(PHP_VERSION, '7.0', '<') ) { @@ -113,7 +114,6 @@ public function toStatement($value, Driver $driver) * that make sense for the rest of the ORM/Database layers. * * @param mixed $value The value to convert. - * * @return mixed Converted value. */ public function marshal($value) diff --git a/app/vendor/cakephp/cakephp/src/Database/Type/BinaryUuidType.php b/app/vendor/cakephp/cakephp/src/Database/Type/BinaryUuidType.php index 8eba18fc5..b6a553352 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Type/BinaryUuidType.php +++ b/app/vendor/cakephp/cakephp/src/Database/Type/BinaryUuidType.php @@ -83,7 +83,7 @@ public function newId() /** * Convert binary uuid into resource handles * - * @param null|string|resource $value The value to convert. + * @param resource|string|null $value The value to convert. * @param \Cake\Database\Driver $driver The driver instance to convert with. * @return resource|string|null * @throws \Cake\Core\Exception\Exception @@ -122,7 +122,6 @@ public function toStatement($value, Driver $driver) * that make sense for the rest of the ORM/Database layers. * * @param mixed $value The value to convert. - * * @return mixed Converted value. */ public function marshal($value) @@ -133,9 +132,7 @@ public function marshal($value) /** * Converts a binary uuid to a string representation * - * * @param mixed $binary The value to convert. - * * @return string Converted value. */ protected function convertBinaryUuidToString($binary) @@ -154,9 +151,7 @@ protected function convertBinaryUuidToString($binary) /** * Converts a string uuid to a binary representation * - * * @param string $string The value to convert. - * * @return string Converted value. */ protected function convertStringToBinaryUuid($string) diff --git a/app/vendor/cakephp/cakephp/src/Database/Type/DateTimeType.php b/app/vendor/cakephp/cakephp/src/Database/Type/DateTimeType.php index 949fefa54..edff61180 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Type/DateTimeType.php +++ b/app/vendor/cakephp/cakephp/src/Database/Type/DateTimeType.php @@ -139,7 +139,8 @@ public function toDatabase($value, Driver $driver) $format = (array)$this->_format; - if ($this->dbTimezone !== null + if ( + $this->dbTimezone !== null && $this->dbTimezone->getName() !== $value->getTimezone()->getName() ) { if (!$value instanceof DateTimeImmutable) { @@ -267,7 +268,8 @@ public function marshal($value) $value += ['hour' => 0, 'minute' => 0, 'second' => 0]; $format = ''; - if (isset($value['year'], $value['month'], $value['day']) && + if ( + isset($value['year'], $value['month'], $value['day']) && (is_numeric($value['year']) && is_numeric($value['month']) && is_numeric($value['day'])) ) { $format .= sprintf('%d-%02d-%02d', $value['year'], $value['month'], $value['day']); @@ -372,7 +374,7 @@ protected function _setClassName($class, $fallback) $class = $fallback; } $this->_className = $class; - $this->_datetimeInstance = new $this->_className; + $this->_datetimeInstance = new $this->_className(); } /** @@ -406,7 +408,7 @@ public function useMutable() */ protected function _parseValue($value) { - /* @var \Cake\I18n\Time $class */ + /** @var \Cake\I18n\Time $class */ $class = $this->_className; return $class::parseDateTime($value, $this->_localeFormat); @@ -417,7 +419,6 @@ protected function _parseValue($value) * * @param mixed $value value to be converted to PDO statement * @param \Cake\Database\Driver $driver object from which database preferences and configuration will be extracted - * * @return mixed */ public function toStatement($value, Driver $driver) diff --git a/app/vendor/cakephp/cakephp/src/Database/Type/DateType.php b/app/vendor/cakephp/cakephp/src/Database/Type/DateType.php index cf7f68d90..5aa30b042 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Type/DateType.php +++ b/app/vendor/cakephp/cakephp/src/Database/Type/DateType.php @@ -21,7 +21,6 @@ */ class DateType extends DateTimeType { - /** * The class to use for representing date objects * @@ -93,7 +92,7 @@ public function marshal($value) */ protected function _parseValue($value) { - /* @var \Cake\I18n\Time $class */ + /** @var \Cake\I18n\Time $class */ $class = $this->_className; return $class::parseDate($value, $this->_localeFormat); diff --git a/app/vendor/cakephp/cakephp/src/Database/Type/DecimalType.php b/app/vendor/cakephp/cakephp/src/Database/Type/DecimalType.php index 64acf40a4..15b377f0d 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Type/DecimalType.php +++ b/app/vendor/cakephp/cakephp/src/Database/Type/DecimalType.php @@ -178,7 +178,8 @@ public function useLocaleParser($enable = true) return $this; } - if (static::$numberClass === 'Cake\I18n\Number' || + if ( + static::$numberClass === 'Cake\I18n\Number' || is_subclass_of(static::$numberClass, 'Cake\I18n\Number') ) { $this->_useLocaleParser = $enable; @@ -199,7 +200,7 @@ public function useLocaleParser($enable = true) */ protected function _parseValue($value) { - /* @var \Cake\I18n\Number $class */ + /** @var \Cake\I18n\Number $class */ $class = static::$numberClass; return $class::parseFloat($value); diff --git a/app/vendor/cakephp/cakephp/src/Database/Type/ExpressionTypeCasterTrait.php b/app/vendor/cakephp/cakephp/src/Database/Type/ExpressionTypeCasterTrait.php index 51c624757..0976220a7 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Type/ExpressionTypeCasterTrait.php +++ b/app/vendor/cakephp/cakephp/src/Database/Type/ExpressionTypeCasterTrait.php @@ -19,11 +19,9 @@ /** * Offers a method to convert values to ExpressionInterface objects * if the type they should be converted to implements ExpressionTypeInterface - * */ trait ExpressionTypeCasterTrait { - /** * Conditionally converts the passed value to an ExpressionInterface object * if the type class implements the ExpressionTypeInterface. Otherwise, diff --git a/app/vendor/cakephp/cakephp/src/Database/Type/ExpressionTypeInterface.php b/app/vendor/cakephp/cakephp/src/Database/Type/ExpressionTypeInterface.php index d2f931e73..0210e3123 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Type/ExpressionTypeInterface.php +++ b/app/vendor/cakephp/cakephp/src/Database/Type/ExpressionTypeInterface.php @@ -21,7 +21,6 @@ */ interface ExpressionTypeInterface { - /** * Returns an ExpressionInterface object for the given value that can * be used in queries. diff --git a/app/vendor/cakephp/cakephp/src/Database/Type/FloatType.php b/app/vendor/cakephp/cakephp/src/Database/Type/FloatType.php index bc3a70dd5..2cf1c1d54 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Type/FloatType.php +++ b/app/vendor/cakephp/cakephp/src/Database/Type/FloatType.php @@ -85,7 +85,7 @@ public function toDatabase($value, Driver $driver) /** * Convert float values to PHP integers * - * @param null|string|resource $value The value to convert. + * @param resource|string|null $value The value to convert. * @param \Cake\Database\Driver $driver The driver instance to convert with. * @return float|null * @throws \Cake\Core\Exception\Exception @@ -133,7 +133,7 @@ public function toStatement($value, Driver $driver) * Marshals request data into PHP floats. * * @param mixed $value The value to convert. - * @return float|null Converted value. + * @return float|string|null Converted value. */ public function marshal($value) { @@ -167,7 +167,8 @@ public function useLocaleParser($enable = true) return $this; } - if (static::$numberClass === 'Cake\I18n\Number' || + if ( + static::$numberClass === 'Cake\I18n\Number' || is_subclass_of(static::$numberClass, 'Cake\I18n\Number') ) { $this->_useLocaleParser = $enable; diff --git a/app/vendor/cakephp/cakephp/src/Database/Type/JsonType.php b/app/vendor/cakephp/cakephp/src/Database/Type/JsonType.php index f16c7fd75..ed9bb8046 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Type/JsonType.php +++ b/app/vendor/cakephp/cakephp/src/Database/Type/JsonType.php @@ -72,7 +72,7 @@ public function toDatabase($value, Driver $driver) * * @param mixed $value The value to convert. * @param \Cake\Database\Driver $driver The driver instance to convert with. - * @return string|null|array + * @return string|array|null */ public function toPHP($value, Driver $driver) { diff --git a/app/vendor/cakephp/cakephp/src/Database/Type/OptionalConvertInterface.php b/app/vendor/cakephp/cakephp/src/Database/Type/OptionalConvertInterface.php index 8d6c03a78..d43fd606f 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Type/OptionalConvertInterface.php +++ b/app/vendor/cakephp/cakephp/src/Database/Type/OptionalConvertInterface.php @@ -20,7 +20,6 @@ */ interface OptionalConvertInterface { - /** * Returns whether the cast to PHP is required to be invoked, since * it is not a identity function. diff --git a/app/vendor/cakephp/cakephp/src/Database/Type/StringType.php b/app/vendor/cakephp/cakephp/src/Database/Type/StringType.php index e75b3d574..5d6f93e74 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Type/StringType.php +++ b/app/vendor/cakephp/cakephp/src/Database/Type/StringType.php @@ -27,7 +27,6 @@ */ class StringType extends Type implements OptionalConvertInterface, TypeInterface { - /** * Convert string data into the database format. * @@ -104,7 +103,7 @@ public function marshal($value) /** * {@inheritDoc} * - * @return boolean False as database results are returned already as strings + * @return bool False as database results are returned already as strings */ public function requiresToPhpCast() { diff --git a/app/vendor/cakephp/cakephp/src/Database/Type/TimeType.php b/app/vendor/cakephp/cakephp/src/Database/Type/TimeType.php index 582a4e287..ce018f059 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Type/TimeType.php +++ b/app/vendor/cakephp/cakephp/src/Database/Type/TimeType.php @@ -21,7 +21,6 @@ */ class TimeType extends DateTimeType { - /** * Time format for DateTime object * @@ -34,7 +33,7 @@ class TimeType extends DateTimeType */ protected function _parseValue($value) { - /* @var \Cake\I18n\Time $class */ + /** @var \Cake\I18n\Time $class */ $class = $this->_className; return $class::parseTime($value, $this->_localeFormat); diff --git a/app/vendor/cakephp/cakephp/src/Database/Type/UuidType.php b/app/vendor/cakephp/cakephp/src/Database/Type/UuidType.php index ecfdb8593..492da50fc 100644 --- a/app/vendor/cakephp/cakephp/src/Database/Type/UuidType.php +++ b/app/vendor/cakephp/cakephp/src/Database/Type/UuidType.php @@ -22,7 +22,6 @@ */ class UuidType extends StringType { - /** * Casts given value from a PHP type to one acceptable by database * @@ -32,7 +31,7 @@ class UuidType extends StringType */ public function toDatabase($value, Driver $driver) { - if ($value === null || $value === '') { + if ($value === null || $value === '' || $value === false) { return null; } diff --git a/app/vendor/cakephp/cakephp/src/Database/TypeConverterTrait.php b/app/vendor/cakephp/cakephp/src/Database/TypeConverterTrait.php index c23ceb743..0b2132f14 100644 --- a/app/vendor/cakephp/cakephp/src/Database/TypeConverterTrait.php +++ b/app/vendor/cakephp/cakephp/src/Database/TypeConverterTrait.php @@ -19,7 +19,6 @@ */ trait TypeConverterTrait { - /** * Converts a give value to a suitable database value based on type * and return relevant internal statement type diff --git a/app/vendor/cakephp/cakephp/src/Database/TypeInterface.php b/app/vendor/cakephp/cakephp/src/Database/TypeInterface.php index d30153162..1068abdef 100644 --- a/app/vendor/cakephp/cakephp/src/Database/TypeInterface.php +++ b/app/vendor/cakephp/cakephp/src/Database/TypeInterface.php @@ -20,7 +20,6 @@ */ interface TypeInterface { - /** * Casts given value from a PHP type to one acceptable by a database. * diff --git a/app/vendor/cakephp/cakephp/src/Database/TypeMap.php b/app/vendor/cakephp/cakephp/src/Database/TypeMap.php index 8eea99fb7..4dacae686 100644 --- a/app/vendor/cakephp/cakephp/src/Database/TypeMap.php +++ b/app/vendor/cakephp/cakephp/src/Database/TypeMap.php @@ -19,7 +19,6 @@ */ class TypeMap { - /** * Associative array with the default fields and the related types this query might contain. * @@ -28,7 +27,7 @@ class TypeMap * * @var string[] */ - protected $_defaults; + protected $_defaults = []; /** * Associative array with the fields and the related types that override defaults this query might contain @@ -205,7 +204,7 @@ public function types(array $types = null) * the column type will be looked for inside the default mapping. If neither exist, * null will be returned. * - * @param string $column The type for a given column + * @param string|int $column The type for a given column * @return string|null */ public function type($column) diff --git a/app/vendor/cakephp/cakephp/src/Database/TypeMapTrait.php b/app/vendor/cakephp/cakephp/src/Database/TypeMapTrait.php index 2ed42e12c..c041af19c 100644 --- a/app/vendor/cakephp/cakephp/src/Database/TypeMapTrait.php +++ b/app/vendor/cakephp/cakephp/src/Database/TypeMapTrait.php @@ -22,7 +22,6 @@ */ trait TypeMapTrait { - /** * @var \Cake\Database\TypeMap */ diff --git a/app/vendor/cakephp/cakephp/src/Database/TypedResultInterface.php b/app/vendor/cakephp/cakephp/src/Database/TypedResultInterface.php index b77d46385..48e8de0ae 100644 --- a/app/vendor/cakephp/cakephp/src/Database/TypedResultInterface.php +++ b/app/vendor/cakephp/cakephp/src/Database/TypedResultInterface.php @@ -22,7 +22,6 @@ */ interface TypedResultInterface { - /** * Sets the type of the value this object will generate. * If called without arguments, returns the current known type diff --git a/app/vendor/cakephp/cakephp/src/Database/TypedResultTrait.php b/app/vendor/cakephp/cakephp/src/Database/TypedResultTrait.php index 337798062..2c920999c 100644 --- a/app/vendor/cakephp/cakephp/src/Database/TypedResultTrait.php +++ b/app/vendor/cakephp/cakephp/src/Database/TypedResultTrait.php @@ -19,7 +19,6 @@ */ trait TypedResultTrait { - /** * The type name this expression will return when executed * diff --git a/app/vendor/cakephp/cakephp/src/Database/ValueBinder.php b/app/vendor/cakephp/cakephp/src/Database/ValueBinder.php index a13838d46..c18edf7b5 100644 --- a/app/vendor/cakephp/cakephp/src/Database/ValueBinder.php +++ b/app/vendor/cakephp/cakephp/src/Database/ValueBinder.php @@ -21,7 +21,6 @@ */ class ValueBinder { - /** * Array containing a list of bound values to the conditions on this * object. Each array entry is another array structure containing the actual @@ -51,7 +50,7 @@ class ValueBinder public function bind($param, $value, $type = 'string') { $this->_bindings[$param] = compact('value', 'type') + [ - 'placeholder' => is_int($param) ? $param : substr($param, 1) + 'placeholder' => is_int($param) ? $param : substr($param, 1), ]; } diff --git a/app/vendor/cakephp/cakephp/src/Database/composer.json b/app/vendor/cakephp/cakephp/src/Database/composer.json index c19711558..839ffbfee 100644 --- a/app/vendor/cakephp/cakephp/src/Database/composer.json +++ b/app/vendor/cakephp/cakephp/src/Database/composer.json @@ -24,7 +24,7 @@ "source": "https://github.com/cakephp/database" }, "require": { - "php": ">=5.6.0", + "php": ">=5.6.0,<8.0.0", "cakephp/cache": "^3.6.0", "cakephp/core": "^3.6.0", "cakephp/datasource": "^3.6.0", diff --git a/app/vendor/cakephp/cakephp/src/Datasource/ConnectionInterface.php b/app/vendor/cakephp/cakephp/src/Datasource/ConnectionInterface.php index c67af789e..e9eb3d3cf 100644 --- a/app/vendor/cakephp/cakephp/src/Datasource/ConnectionInterface.php +++ b/app/vendor/cakephp/cakephp/src/Datasource/ConnectionInterface.php @@ -18,6 +18,7 @@ * This interface defines the methods you can depend on in * a connection. * + * @method object getDriver() Gets the driver instance. * @method object getLogger() Get the current logger instance * @method $this setLogger($logger) Set the current logger. * @method bool supportsDynamicConstraints() @@ -25,6 +26,7 @@ * @method \Cake\Database\Query newQuery() * @method \Cake\Database\StatementInterface prepare($sql) * @method \Cake\Database\StatementInterface execute($query, $params = [], array $types = []) + * @method \Cake\Database\StatementInterface query(string $sql) * @method $this enableQueryLogging($value) * @method $this disableQueryLogging() * @method $this disableSavePoints() diff --git a/app/vendor/cakephp/cakephp/src/Datasource/ConnectionManager.php b/app/vendor/cakephp/cakephp/src/Datasource/ConnectionManager.php index b9beb80f3..6ad676b31 100644 --- a/app/vendor/cakephp/cakephp/src/Datasource/ConnectionManager.php +++ b/app/vendor/cakephp/cakephp/src/Datasource/ConnectionManager.php @@ -28,7 +28,6 @@ */ class ConnectionManager { - use StaticConfigTrait { setConfig as protected _setConfig; parseDsn as protected _parseDsn; @@ -44,7 +43,7 @@ class ConnectionManager /** * An array mapping url schemes to fully qualified driver class names * - * @return array + * @var string[] */ protected static $_dsnClassMap = [ 'mysql' => 'Cake\Database\Driver\Mysql', diff --git a/app/vendor/cakephp/cakephp/src/Datasource/ConnectionRegistry.php b/app/vendor/cakephp/cakephp/src/Datasource/ConnectionRegistry.php index ea9d434dd..a02b0c76a 100644 --- a/app/vendor/cakephp/cakephp/src/Datasource/ConnectionRegistry.php +++ b/app/vendor/cakephp/cakephp/src/Datasource/ConnectionRegistry.php @@ -25,7 +25,6 @@ */ class ConnectionRegistry extends ObjectRegistry { - /** * Resolve a datasource classname. * @@ -49,7 +48,7 @@ protected function _resolveClassName($class) * Part of the template method for Cake\Core\ObjectRegistry::load() * * @param string $class The classname that is missing. - * @param string $plugin The plugin the datasource is missing in. + * @param string|null $plugin The plugin the datasource is missing in. * @return void * @throws \Cake\Datasource\Exception\MissingDatasourceException */ @@ -93,10 +92,12 @@ protected function _create($class, $alias, $settings) * Remove a single adapter from the registry. * * @param string $name The adapter name. - * @return void + * @return $this */ public function unload($name) { unset($this->_loaded[$name]); + + return $this; } } diff --git a/app/vendor/cakephp/cakephp/src/Datasource/EntityInterface.php b/app/vendor/cakephp/cakephp/src/Datasource/EntityInterface.php index cb0e2052e..fb4074e88 100644 --- a/app/vendor/cakephp/cakephp/src/Datasource/EntityInterface.php +++ b/app/vendor/cakephp/cakephp/src/Datasource/EntityInterface.php @@ -24,9 +24,10 @@ * In 4.x the following methods will officially be added to the interface: * * @method $this setHidden(array $properties, $merge = false) - * @method array getHidden() + * @method string[] getHidden() * @method $this setVirtual(array $properties, $merge = false) - * @method array getVirtual() + * @method string[] getVirtual() + * @method string[] getDirty() * @method $this setDirty($property, $isDirty = true) * @method bool isDirty($property = null) * @method bool hasErrors($includeNested = true) @@ -41,12 +42,12 @@ * @method array extractOriginal(array $properties) * @method array extractOriginalChanged(array $properties) * @method array getVisible() - * + * @method $this setNew($new) * @property mixed $id Alias for commonly used primary key. + * @method bool[] getAccessible() */ interface EntityInterface extends ArrayAccess, JsonSerializable { - /** * Sets one or multiple properties to the specified value * @@ -91,7 +92,7 @@ public function unsetProperty($property); * If the properties argument is null, the currently hidden properties * will be returned. Otherwise the hidden properties will be set. * - * @param null|array $properties Either an array of properties to hide or null to get properties + * @param array|null $properties Either an array of properties to hide or null to get properties * @return array|\Cake\Datasource\EntityInterface */ public function hiddenProperties($properties = null); @@ -102,7 +103,7 @@ public function hiddenProperties($properties = null); * If the properties argument is null, the currently virtual properties * will be returned. Otherwise the virtual properties will be set. * - * @param null|array $properties Either an array of properties to treat as virtual or null to get properties + * @param array|null $properties Either an array of properties to treat as virtual or null to get properties * @return array|\Cake\Datasource\EntityInterface */ public function virtualProperties($properties = null); @@ -144,7 +145,7 @@ public function extract(array $properties, $onlyDirty = false); * * @deprecated 3.4.0 Use setDirty() and isDirty() instead. * @param string|null $property the field to set or check status for - * @param null|bool $isDirty true means the property was changed, false means + * @param bool|null $isDirty true means the property was changed, false means * it was not changed and null will make the function return current state * for that property * @return bool whether the property was changed or not diff --git a/app/vendor/cakephp/cakephp/src/Datasource/EntityTrait.php b/app/vendor/cakephp/cakephp/src/Datasource/EntityTrait.php index 991f699cc..e8a756e8f 100644 --- a/app/vendor/cakephp/cakephp/src/Datasource/EntityTrait.php +++ b/app/vendor/cakephp/cakephp/src/Datasource/EntityTrait.php @@ -26,7 +26,6 @@ */ trait EntityTrait { - /** * Holds all properties and their values for this entity * @@ -45,7 +44,7 @@ trait EntityTrait * List of property names that should **not** be included in JSON or Array * representations of this Entity. * - * @var array + * @var string[] */ protected $_hidden = []; @@ -54,7 +53,7 @@ trait EntityTrait * representations of this Entity. If a field is present in both _hidden and _virtual * the field will **not** be in the array/json versions of the entity. * - * @var array + * @var string[] */ protected $_virtual = []; @@ -62,7 +61,6 @@ trait EntityTrait * Holds the name of the class for the instance object * * @var string - * * @deprecated 3.2 This field is no longer being used */ protected $_className; @@ -71,7 +69,7 @@ trait EntityTrait * Holds a list of the properties that were modified or added after this object * was originally created. * - * @var array + * @var bool[] */ protected $_dirty = []; @@ -248,7 +246,8 @@ public function set($property, $value = null, array $options = []) $this->setDirty($p, true); - if (!array_key_exists($p, $this->_original) && + if ( + !array_key_exists($p, $this->_original) && array_key_exists($p, $this->_properties) && $this->_properties[$p] !== $value ) { @@ -360,7 +359,7 @@ public function getOriginalValues() * When checking multiple properties. All properties must not be null * in order for true to be returned. * - * @param string|array $property The property or properties to check. + * @param string|string[] $property The property or properties to check. * @return bool */ public function has($property) @@ -392,9 +391,16 @@ public function has($property) public function isEmpty($property) { $value = $this->get($property); - if ($value === null - || (is_array($value) && empty($value) - || (is_string($value) && empty($value))) + if ( + $value === null || + ( + is_array($value) && + empty($value) || + ( + is_string($value) && + $value === '' + ) + ) ) { return true; } @@ -433,7 +439,7 @@ public function hasValue($property) * $entity->unsetProperty(['name', 'last_name']); * ``` * - * @param string|array $property The property to unset. + * @param string|string[] $property The property to unset. * @return $this */ public function unsetProperty($property) @@ -453,8 +459,8 @@ public function unsetProperty($property) * will be returned. Otherwise the hidden properties will be set. * * @deprecated 3.4.0 Use EntityTrait::setHidden() and EntityTrait::getHidden() - * @param null|array $properties Either an array of properties to hide or null to get properties - * @return array|$this + * @param string[]|null $properties Either an array of properties to hide or null to get properties + * @return string[]|$this */ public function hiddenProperties($properties = null) { @@ -473,7 +479,7 @@ public function hiddenProperties($properties = null) /** * Sets hidden properties. * - * @param array $properties An array of properties to hide from array exports. + * @param string[] $properties An array of properties to hide from array exports. * @param bool $merge Merge the new properties with the existing. By default false. * @return $this */ @@ -494,7 +500,7 @@ public function setHidden(array $properties, $merge = false) /** * Gets the hidden properties. * - * @return array + * @return string[] */ public function getHidden() { @@ -508,8 +514,8 @@ public function getHidden() * will be returned. Otherwise the virtual properties will be set. * * @deprecated 3.4.0 Use EntityTrait::getVirtual() and EntityTrait::setVirtual() - * @param null|array $properties Either an array of properties to treat as virtual or null to get properties - * @return array|$this + * @param string[]|null $properties Either an array of properties to treat as virtual or null to get properties + * @return string[]|$this */ public function virtualProperties($properties = null) { @@ -527,7 +533,7 @@ public function virtualProperties($properties = null) /** * Sets the virtual properties on this entity. * - * @param array $properties An array of properties to treat as virtual. + * @param string[] $properties An array of properties to treat as virtual. * @param bool $merge Merge the new properties with the existing. By default false. * @return $this */ @@ -548,7 +554,7 @@ public function setVirtual(array $properties, $merge = false) /** * Gets the virtual properties on this entity. * - * @return array + * @return string[] */ public function getVirtual() { @@ -561,7 +567,7 @@ public function getVirtual() * The list of visible properties is all standard properties * plus virtual properties minus hidden properties. * - * @return array A list of properties that are 'visible' in all + * @return string[] A list of properties that are 'visible' in all * representations. */ public function getVisible() @@ -578,7 +584,7 @@ public function getVisible() * The list of visible properties is all standard properties * plus virtual properties minus hidden properties. * - * @return array A list of properties that are 'visible' in all + * @return string[] A list of properties that are 'visible' in all * representations. * @deprecated 3.8.0 Use getVisible() instead. */ @@ -728,7 +734,7 @@ protected static function _accessor($property, $type) * Returns an array with the requested properties * stored in this entity, indexed by property name * - * @param array $properties list of properties to be returned + * @param string[] $properties list of properties to be returned * @param bool $onlyDirty Return the requested property only if it is dirty * @return array */ @@ -751,7 +757,7 @@ public function extract(array $properties, $onlyDirty = false) * Properties that are unchanged from their original value will be included in the * return of this method. * - * @param array $properties List of properties to be returned + * @param string[] $properties List of properties to be returned * @return array */ public function extractOriginal(array $properties) @@ -771,7 +777,7 @@ public function extractOriginal(array $properties) * This method will only return properties that have been modified since * the entity was built. Unchanged properties will be omitted. * - * @param array $properties List of properties to be returned + * @param string[] $properties List of properties to be returned * @return array */ public function extractOriginalChanged(array $properties) @@ -797,7 +803,7 @@ public function extractOriginalChanged(array $properties) * * @deprecated 3.4.0 Use EntityTrait::setDirty() and EntityTrait::isDirty() * @param string|null $property the field to set or check status for - * @param null|bool $isDirty true means the property was changed, false means + * @param bool|null $isDirty true means the property was changed, false means * it was not changed and null will make the function return current state * for that property * @return bool Whether the property was changed or not @@ -884,32 +890,41 @@ public function clean() } /** - * Returns whether or not this entity has already been persisted. - * This method can return null in the case there is no prior information on - * the status of this entity. + * Set the status of this entity. * - * If called with a boolean it will set the known status of this instance, - * true means that the instance is not yet persisted in the database, false - * that it already is. + * Using `true` means that the entity has not been persisted in the database, + * `false` that it already is. * - * @param bool|null $new true if it is known this instance was not yet persisted - * @return bool Whether or not the entity has been persisted. + * @param bool $new Indicate whether or not this entity has been persisted. + * @return $this */ - public function isNew($new = null) + public function setNew($new) { - if ($new === null) { - return $this->_new; - } - - $new = (bool)$new; - if ($new) { foreach ($this->_properties as $k => $p) { $this->_dirty[$k] = true; } } - return $this->_new = $new; + $this->_new = $new; + + return $this; + } + + /** + * Returns whether or not this entity has already been persisted. + * + * @param bool|null $new true if it is known this instance was not yet persisted. + * This will be deprecated in 4.0, use `setNew()` instead. + * @return bool Whether or not the entity has been persisted. + */ + public function isNew($new = null) + { + if ($new !== null) { + $this->setNew($new); + } + + return $this->_new; } /** @@ -1125,7 +1140,8 @@ protected function _nestedErrors($field) $val = isset($entity[$part]) ? $entity[$part] : false; } - if (is_array($val) || + if ( + is_array($val) || $val instanceof Traversable || $val instanceof EntityInterface ) { @@ -1364,7 +1380,7 @@ public function accessible($property, $set = null) * $entity->setAccess('*', false); // Mark all properties as protected * ``` * - * @param string|array $property single or list of properties to change its accessibility + * @param string|string[] $property single or list of properties to change its accessibility * @param bool $set true marks the property as accessible, false will * mark it as protected. * @return $this @@ -1387,6 +1403,17 @@ public function setAccess($property, $set) return $this; } + /** + * Returns the raw accessible configuration for this entity. + * The `*` wildcard refers to all fields. + * + * @return bool[] + */ + public function getAccessible() + { + return $this->_accessible; + } + /** * Checks if a property is accessible * @@ -1488,7 +1515,7 @@ public function __debugInfo() '[hasErrors]' => $this->hasErrors(), '[errors]' => $this->_errors, '[invalid]' => $this->_invalid, - '[repository]' => $this->_registryAlias + '[repository]' => $this->_registryAlias, ]; } } diff --git a/app/vendor/cakephp/cakephp/src/Datasource/Exception/InvalidPrimaryKeyException.php b/app/vendor/cakephp/cakephp/src/Datasource/Exception/InvalidPrimaryKeyException.php index 9a033a781..db51daa76 100644 --- a/app/vendor/cakephp/cakephp/src/Datasource/Exception/InvalidPrimaryKeyException.php +++ b/app/vendor/cakephp/cakephp/src/Datasource/Exception/InvalidPrimaryKeyException.php @@ -21,7 +21,6 @@ */ class InvalidPrimaryKeyException extends Exception { - /** * {@inheritDoc} */ diff --git a/app/vendor/cakephp/cakephp/src/Datasource/Exception/MissingDatasourceConfigException.php b/app/vendor/cakephp/cakephp/src/Datasource/Exception/MissingDatasourceConfigException.php index eebfaff70..f5af83bf7 100644 --- a/app/vendor/cakephp/cakephp/src/Datasource/Exception/MissingDatasourceConfigException.php +++ b/app/vendor/cakephp/cakephp/src/Datasource/Exception/MissingDatasourceConfigException.php @@ -19,6 +19,8 @@ */ class MissingDatasourceConfigException extends Exception { - + /** + * @inheritDoc + */ protected $_messageTemplate = 'The datasource configuration "%s" was not found.'; } diff --git a/app/vendor/cakephp/cakephp/src/Datasource/Exception/MissingDatasourceException.php b/app/vendor/cakephp/cakephp/src/Datasource/Exception/MissingDatasourceException.php index 66e0b2eea..1b1931ea8 100644 --- a/app/vendor/cakephp/cakephp/src/Datasource/Exception/MissingDatasourceException.php +++ b/app/vendor/cakephp/cakephp/src/Datasource/Exception/MissingDatasourceException.php @@ -19,6 +19,8 @@ */ class MissingDatasourceException extends Exception { - + /** + * @inheritDoc + */ protected $_messageTemplate = 'Datasource class %s could not be found. %s'; } diff --git a/app/vendor/cakephp/cakephp/src/Datasource/Exception/MissingModelException.php b/app/vendor/cakephp/cakephp/src/Datasource/Exception/MissingModelException.php index bf6b50874..a156f8e4b 100644 --- a/app/vendor/cakephp/cakephp/src/Datasource/Exception/MissingModelException.php +++ b/app/vendor/cakephp/cakephp/src/Datasource/Exception/MissingModelException.php @@ -21,6 +21,8 @@ */ class MissingModelException extends Exception { - + /** + * @inheritDoc + */ protected $_messageTemplate = 'Model class "%s" of type "%s" could not be found.'; } diff --git a/app/vendor/cakephp/cakephp/src/Datasource/Exception/RecordNotFoundException.php b/app/vendor/cakephp/cakephp/src/Datasource/Exception/RecordNotFoundException.php index 60e2dd1f1..89a080c63 100644 --- a/app/vendor/cakephp/cakephp/src/Datasource/Exception/RecordNotFoundException.php +++ b/app/vendor/cakephp/cakephp/src/Datasource/Exception/RecordNotFoundException.php @@ -21,7 +21,6 @@ */ class RecordNotFoundException extends Exception { - /** * {@inheritDoc} */ diff --git a/app/vendor/cakephp/cakephp/src/Datasource/ModelAwareTrait.php b/app/vendor/cakephp/cakephp/src/Datasource/ModelAwareTrait.php index f9d4c8220..80e88cf1c 100644 --- a/app/vendor/cakephp/cakephp/src/Datasource/ModelAwareTrait.php +++ b/app/vendor/cakephp/cakephp/src/Datasource/ModelAwareTrait.php @@ -26,7 +26,6 @@ */ trait ModelAwareTrait { - /** * This object's primary model class name. Should be a plural form. * CakePHP will not inflect the name. @@ -159,7 +158,6 @@ public function getModelType() * Set the model type to be used by this class * * @param string $modelType The model type - * * @return $this */ public function setModelType($modelType) @@ -174,7 +172,6 @@ public function setModelType($modelType) * * @deprecated 3.5.0 Use getModelType()/setModelType() instead. * @param string|null $modelType The model type or null to retrieve the current - * * @return string|$this */ public function modelType($modelType = null) diff --git a/app/vendor/cakephp/cakephp/src/Datasource/Paginator.php b/app/vendor/cakephp/cakephp/src/Datasource/Paginator.php index aecae8057..29e926f77 100644 --- a/app/vendor/cakephp/cakephp/src/Datasource/Paginator.php +++ b/app/vendor/cakephp/cakephp/src/Datasource/Paginator.php @@ -43,7 +43,7 @@ class Paginator implements PaginatorInterface 'page' => 1, 'limit' => 20, 'maxLimit' => 100, - 'whitelist' => ['limit', 'sort', 'page', 'direction'] + 'whitelist' => ['limit', 'sort', 'page', 'direction'], ]; /** @@ -166,6 +166,68 @@ public function paginate($object, array $params = [], array $settings = []) $object = $query->getRepository(); } + $data = $this->extractData($object, $params, $settings); + $query = $this->getQuery($object, $query, $data); + + $cleanQuery = clone $query; + $results = $query->all(); + $data['numResults'] = count($results); + $data['count'] = $this->getCount($cleanQuery, $data); + + $pagingParams = $this->buildParams($data); + $alias = $object->getAlias(); + $this->_pagingParams = [$alias => $pagingParams]; + if ($pagingParams['requestedPage'] > $pagingParams['page']) { + throw new PageOutOfBoundsException([ + 'requestedPage' => $pagingParams['requestedPage'], + 'pagingParams' => $this->_pagingParams, + ]); + } + + return $results; + } + + /** + * Get query for fetching paginated results. + * + * @param \Cake\Datasource\RepositoryInterface $object Repository instance. + * @param \Cake\Datasource\QueryInterface|null $query Query Instance. + * @param array $data Pagination data. + * @return \Cake\Datasource\QueryInterface + */ + protected function getQuery(RepositoryInterface $object, QueryInterface $query = null, array $data) + { + if ($query === null) { + $query = $object->find($data['finder'], $data['options']); + } else { + $query->applyOptions($data['options']); + } + + return $query; + } + + /** + * Get total count of records. + * + * @param \Cake\Datasource\QueryInterface $query Query instance. + * @param array $data Pagination data. + * @return int|null + */ + protected function getCount(QueryInterface $query, array $data) + { + return $query->count(); + } + + /** + * Extract pagination data needed + * + * @param \Cake\Datasource\RepositoryInterface $object The repository object. + * @param array $params Request params + * @param array $settings The settings/configuration used for pagination. + * @return array Array with keys 'defaults', 'options' and 'finder' + */ + protected function extractData(RepositoryInterface $object, array $params, array $settings) + { $alias = $object->getAlias(); $defaults = $this->getDefaults($alias, $settings); $options = $this->mergeOptions($params, $defaults); @@ -176,69 +238,135 @@ public function paginate($object, array $params = [], array $settings = []) $options['page'] = (int)$options['page'] < 1 ? 1 : (int)$options['page']; list($finder, $options) = $this->_extractFinder($options); - if (empty($query)) { - $query = $object->find($finder, $options); - } else { - $query->applyOptions($options); + return compact('defaults', 'options', 'finder'); + } + + /** + * Build pagination params. + * + * @param array $data Paginator data containing keys 'options', + * 'count', 'defaults', 'finder', 'numResults'. + * @return array Paging params. + */ + protected function buildParams(array $data) + { + $limit = $data['options']['limit']; + + $paging = [ + 'count' => $data['count'], + 'current' => $data['numResults'], + 'perPage' => $limit, + 'page' => $data['options']['page'], + 'requestedPage' => $data['options']['page'], + ]; + + $paging = $this->addPageCountParams($paging, $data); + $paging = $this->addStartEndParams($paging, $data); + $paging = $this->addPrevNextParams($paging, $data); + $paging = $this->addSortingParams($paging, $data); + + $paging += [ + 'limit' => $data['defaults']['limit'] != $limit ? $limit : null, + 'scope' => $data['options']['scope'], + 'finder' => $data['finder'], + ]; + + return $paging; + } + + /** + * Add "page" and "pageCount" params. + * + * @param array $params Paging params. + * @param array $data Paginator data. + * @return array Updated params. + */ + protected function addPageCountParams(array $params, array $data) + { + $page = $params['page']; + $pageCount = 0; + + if ($params['count'] !== null) { + $pageCount = max((int)ceil($params['count'] / $params['perPage']), 1); + $page = min($page, $pageCount); + } elseif ($params['current'] === 0 && $params['requestedPage'] > 1) { + $page = 1; } - $cleanQuery = clone $query; - $results = $query->all(); - $numResults = count($results); - $count = $cleanQuery->count(); + $params['page'] = $page; + $params['pageCount'] = $pageCount; + + return $params; + } + + /** + * Add "start" and "end" params. + * + * @param array $params Paging params. + * @param array $data Paginator data. + * @return array Updated params. + */ + protected function addStartEndParams(array $params, array $data) + { + $start = $end = 0; + + if ($params['current'] > 0) { + $start = (($params['page'] - 1) * $params['perPage']) + 1; + $end = $start + $params['current'] - 1; + } + + $params['start'] = $start; + $params['end'] = $end; + + return $params; + } + + /** + * Add "prevPage" and "nextPage" params. + * + * @param array $params Paginator params. + * @param array $data Paging data. + * @return array Updated params. + */ + protected function addPrevNextParams(array $params, array $data) + { + $params['prevPage'] = $params['page'] > 1; + if ($params['count'] === null) { + $params['nextPage'] = true; + } else { + $params['nextPage'] = $params['count'] > ($params['page'] * $params['perPage']); + } - $page = $options['page']; - $limit = $options['limit']; - $pageCount = max((int)ceil($count / $limit), 1); - $requestedPage = $page; - $page = min($page, $pageCount); + return $params; + } - $order = (array)$options['order']; + /** + * Add sorting / ordering params. + * + * @param array $params Paginator params. + * @param array $data Paging data. + * @return array Updated params. + */ + protected function addSortingParams(array $params, array $data) + { + $defaults = $data['defaults']; + $order = (array)$data['options']['order']; $sortDefault = $directionDefault = false; + if (!empty($defaults['order']) && count($defaults['order']) === 1) { $sortDefault = key($defaults['order']); $directionDefault = current($defaults['order']); } - $start = 0; - if ($count >= 1) { - $start = (($page - 1) * $limit) + 1; - } - $end = $start + $limit - 1; - if ($count < $end) { - $end = $count; - } - - $paging = [ - 'finder' => $finder, - 'page' => $page, - 'current' => $numResults, - 'count' => $count, - 'perPage' => $limit, - 'start' => $start, - 'end' => $end, - 'prevPage' => $page > 1, - 'nextPage' => $count > ($page * $limit), - 'pageCount' => $pageCount, - 'sort' => $options['sort'], - 'direction' => isset($options['sort']) ? current($order) : null, - 'limit' => $defaults['limit'] != $limit ? $limit : null, + $params += [ + 'sort' => $data['options']['sort'], + 'direction' => isset($data['options']['sort']) ? current($order) : null, 'sortDefault' => $sortDefault, 'directionDefault' => $directionDefault, - 'scope' => $options['scope'], 'completeSort' => $order, ]; - $this->_pagingParams = [$alias => $paging]; - - if ($requestedPage > $page) { - throw new PageOutOfBoundsException([ - 'requestedPage' => $requestedPage, - 'pagingParams' => $this->_pagingParams - ]); - } - - return $results; + return $params; } /** @@ -394,7 +522,8 @@ public function validateSort(RepositoryInterface $object, array $options) } } - if ($options['sort'] === null + if ( + $options['sort'] === null && count($options['order']) === 1 && !is_numeric(key($options['order'])) ) { diff --git a/app/vendor/cakephp/cakephp/src/Datasource/QueryCacher.php b/app/vendor/cakephp/cakephp/src/Datasource/QueryCacher.php index 6d3f65712..7c8826eda 100644 --- a/app/vendor/cakephp/cakephp/src/Datasource/QueryCacher.php +++ b/app/vendor/cakephp/cakephp/src/Datasource/QueryCacher.php @@ -28,7 +28,6 @@ */ class QueryCacher { - /** * The key or function to generate a key. * diff --git a/app/vendor/cakephp/cakephp/src/Datasource/QueryInterface.php b/app/vendor/cakephp/cakephp/src/Datasource/QueryInterface.php index 793258e5d..71d083911 100644 --- a/app/vendor/cakephp/cakephp/src/Datasource/QueryInterface.php +++ b/app/vendor/cakephp/cakephp/src/Datasource/QueryInterface.php @@ -24,9 +24,19 @@ */ interface QueryInterface { - + /** + * @var string + */ const JOIN_TYPE_INNER = 'INNER'; + + /** + * @var string + */ const JOIN_TYPE_LEFT = 'LEFT'; + + /** + * @var string + */ const JOIN_TYPE_RIGHT = 'RIGHT'; /** @@ -208,7 +218,9 @@ public function offset($num); * `ORDER BY title DESC, author_id ASC` * * ``` - * $query->order(['title' => 'DESC NULLS FIRST'])->order('author_id'); + * $query + * ->order(['title' => $query->newExpr('DESC NULLS FIRST')]) + * ->order('author_id'); * ``` * * Will generate: @@ -347,8 +359,8 @@ public function repository(RepositoryInterface $repository = null); * $query * ->where(['title !=' => 'Hello World']) * ->where(function ($exp, $query) { - * $or = $exp->or_(['id' => 1]); - * $and = $exp->and_(['id >' => 2, 'id <' => 10]); + * $or = $exp->or(['id' => 1]); + * $and = $exp->and(['id >' => 2, 'id <' => 10]); * return $or->add($and); * }); * ``` diff --git a/app/vendor/cakephp/cakephp/src/Datasource/QueryTrait.php b/app/vendor/cakephp/cakephp/src/Datasource/QueryTrait.php index abb4fdd43..fd180d1b2 100644 --- a/app/vendor/cakephp/cakephp/src/Datasource/QueryTrait.php +++ b/app/vendor/cakephp/cakephp/src/Datasource/QueryTrait.php @@ -24,7 +24,6 @@ */ trait QueryTrait { - /** * Instance of a table object this query is bound to * @@ -87,6 +86,8 @@ trait QueryTrait * When called with a Table argument, the default table object will be set * and this query object will be returned for chaining. * + * Deprecated: 3.6.0 Using Query::repository() as getter is deprecated. Use getRepository() instead. + * * @param \Cake\Datasource\RepositoryInterface|null $table The default table object to use * @return \Cake\Datasource\RepositoryInterface|$this */ @@ -179,7 +180,7 @@ public function getIterator() * $query->cache(false); * ``` * - * @param false|string|\Closure $key Either the cache key or a function to generate the cache key. + * @param \Closure|string|false $key Either the cache key or a function to generate the cache key. * When using a function, this query instance will be supplied as an argument. * @param string|\Cake\Cache\CacheEngine $config Either the name of the cache config to use, or * a cache config instance. diff --git a/app/vendor/cakephp/cakephp/src/Datasource/README.md b/app/vendor/cakephp/cakephp/src/Datasource/README.md index 093a6c26f..9f756bca9 100644 --- a/app/vendor/cakephp/cakephp/src/Datasource/README.md +++ b/app/vendor/cakephp/cakephp/src/Datasource/README.md @@ -27,7 +27,7 @@ Additionally, this package provides a few traits and classes you can use in your * `EntityTrait` - Contains the default implementation for the `EntityInterface`. * `QueryTrait` - Exposes the methods for creating a query object capable of returning decoratable collections. -* `ResultSetDecorator` - Decorates any traversable object so it complies with `ResultSetInterface`. +* `ResultSetDecorator` - Decorates any traversable object, so it complies with `ResultSetInterface`. ## Connections diff --git a/app/vendor/cakephp/cakephp/src/Datasource/RepositoryInterface.php b/app/vendor/cakephp/cakephp/src/Datasource/RepositoryInterface.php index 171835df1..3405acbd8 100644 --- a/app/vendor/cakephp/cakephp/src/Datasource/RepositoryInterface.php +++ b/app/vendor/cakephp/cakephp/src/Datasource/RepositoryInterface.php @@ -25,7 +25,6 @@ */ interface RepositoryInterface { - /** * Returns the table alias or sets a new one * diff --git a/app/vendor/cakephp/cakephp/src/Datasource/ResultSetDecorator.php b/app/vendor/cakephp/cakephp/src/Datasource/ResultSetDecorator.php index 6d6f626c1..cf4da00d9 100644 --- a/app/vendor/cakephp/cakephp/src/Datasource/ResultSetDecorator.php +++ b/app/vendor/cakephp/cakephp/src/Datasource/ResultSetDecorator.php @@ -23,7 +23,6 @@ */ class ResultSetDecorator extends Collection implements ResultSetInterface { - /** * Make this object countable. * diff --git a/app/vendor/cakephp/cakephp/src/Datasource/RulesAwareTrait.php b/app/vendor/cakephp/cakephp/src/Datasource/RulesAwareTrait.php index 98c161dad..5cabda5da 100644 --- a/app/vendor/cakephp/cakephp/src/Datasource/RulesAwareTrait.php +++ b/app/vendor/cakephp/cakephp/src/Datasource/RulesAwareTrait.php @@ -29,7 +29,6 @@ */ trait RulesAwareTrait { - /** * The domain rules to be applied to entities saved by this table * diff --git a/app/vendor/cakephp/cakephp/src/Datasource/SchemaInterface.php b/app/vendor/cakephp/cakephp/src/Datasource/SchemaInterface.php index 69e5e3999..93ecf29b5 100644 --- a/app/vendor/cakephp/cakephp/src/Datasource/SchemaInterface.php +++ b/app/vendor/cakephp/cakephp/src/Datasource/SchemaInterface.php @@ -19,7 +19,6 @@ */ interface SchemaInterface { - /** * Get the name of the table. * diff --git a/app/vendor/cakephp/cakephp/src/Datasource/SimplePaginator.php b/app/vendor/cakephp/cakephp/src/Datasource/SimplePaginator.php new file mode 100644 index 000000000..319ccee52 --- /dev/null +++ b/app/vendor/cakephp/cakephp/src/Datasource/SimplePaginator.php @@ -0,0 +1,38 @@ +=5.6.0", + "php": ">=5.6.0,<8.0.0", "cakephp/core": "^3.6.0" }, "suggest": { diff --git a/app/vendor/cakephp/cakephp/src/Error/BaseErrorHandler.php b/app/vendor/cakephp/cakephp/src/Error/BaseErrorHandler.php index 89e70959e..73002551c 100644 --- a/app/vendor/cakephp/cakephp/src/Error/BaseErrorHandler.php +++ b/app/vendor/cakephp/cakephp/src/Error/BaseErrorHandler.php @@ -29,7 +29,6 @@ */ abstract class BaseErrorHandler { - /** * Options to use for the Error handling. * @@ -115,8 +114,8 @@ public function register() * Set as the default error handler by CakePHP. * * Use config/error.php to customize or replace this error handler. - * This function will use Debugger to display errors when debug > 0. And - * will log errors to Log, when debug == 0. + * This function will use Debugger to display errors when debug mode is on. And + * will log errors to Log, when debug mode is off. * * You can use the 'errorLevel' option to set what type of errors will be handled. * Stack traces for errors can be enabled with the 'trace' option. @@ -149,10 +148,20 @@ public function handleError($code, $description, $file = null, $line = null, $co $debug = Configure::read('debug'); if ($debug) { + // By default trim 3 frames off for the public and protected methods + // used by ErrorHandler instances. + $start = 3; + + // Can be used by error handlers that wrap other error handlers + // to coerce the generated stack trace to the correct point. + if (isset($context['_trace_frame_offset'])) { + $start += $context['_trace_frame_offset']; + unset($context['_trace_frame_offset']); + } $data += [ 'context' => $context, - 'start' => 3, - 'path' => Debugger::trimPath($file) + 'start' => $start, + 'path' => Debugger::trimPath($file), ]; } $this->_displayError($data, $debug); @@ -283,7 +292,7 @@ protected function _logError($level, $data) if (!empty($this->_options['trace'])) { $trace = Debugger::trace([ 'start' => 1, - 'format' => 'log' + 'format' => 'log', ]); $request = Router::getRequest(); diff --git a/app/vendor/cakephp/cakephp/src/Error/Debugger.php b/app/vendor/cakephp/cakephp/src/Error/Debugger.php index 353cbef0c..aaaf28f87 100644 --- a/app/vendor/cakephp/cakephp/src/Error/Debugger.php +++ b/app/vendor/cakephp/cakephp/src/Error/Debugger.php @@ -29,7 +29,7 @@ * * Debugger overrides PHP's default error handling to provide stack traces and enhanced logging * - * @link https://book.cakephp.org/3.0/en/development/debugging.html#namespace-Cake\Error + * @link https://book.cakephp.org/3/en/development/debugging.html#namespace-Cake\Error */ class Debugger { @@ -41,7 +41,7 @@ class Debugger * @var array */ protected $_defaultConfig = [ - 'outputMask' => [] + 'outputMask' => [], ]; /** @@ -67,7 +67,7 @@ class Debugger protected $_templates = [ 'log' => [ 'trace' => '{:reference} - {:path}, line {:line}', - 'error' => '{:error} ({:code}): {:description} in [{:file}, line {:line}]' + 'error' => '{:error} ({:code}): {:description} in [{:file}, line {:line}]', ], 'js' => [ 'error' => '', @@ -86,13 +86,13 @@ class Debugger 'txt' => [ 'error' => "{:error}: {:code} :: {:description} on line {:line} of {:path}\n{:info}", 'code' => '', - 'info' => '' + 'info' => '', ], 'base' => [ 'traceLine' => '{:reference} - {:path}, line {:line}', 'trace' => "Trace:\n{:trace}\n", 'context' => "Context:\n{:context}\n", - ] + ], ]; /** @@ -104,7 +104,6 @@ class Debugger /** * Constructor. - * */ public function __construct() { @@ -231,7 +230,7 @@ public static function setOutputMask(array $value, $merge = true) * @param int $depth The depth to output to. Defaults to 3. * @return void * @see \Cake\Error\Debugger::exportVar() - * @link https://book.cakephp.org/3.0/en/development/debugging.html#outputting-values + * @link https://book.cakephp.org/3/en/development/debugging.html#outputting-values */ public static function dump($var, $depth = 3) { @@ -270,7 +269,7 @@ public static function log($var, $level = 'debug', $depth = 3) * * @param array $options Format for outputting stack trace. * @return string|array Formatted stack trace. - * @link https://book.cakephp.org/3.0/en/development/debugging.html#generating-stack-traces + * @link https://book.cakephp.org/3/en/development/debugging.html#generating-stack-traces */ public static function trace(array $options = []) { @@ -292,7 +291,7 @@ public static function trace(array $options = []) * @param array|\Exception $backtrace Trace as array or an exception object. * @param array $options Format for outputting stack trace. * @return string|array Formatted stack trace. - * @link https://book.cakephp.org/3.0/en/development/debugging.html#generating-stack-traces + * @link https://book.cakephp.org/3/en/development/debugging.html#generating-stack-traces */ public static function formatTrace($backtrace, $options = []) { @@ -306,7 +305,7 @@ public static function formatTrace($backtrace, $options = []) 'args' => false, 'start' => 0, 'scope' => null, - 'exclude' => ['call_user_func_array', 'trigger_error'] + 'exclude' => ['call_user_func_array', 'trigger_error'], ]; $options = Hash::merge($defaults, $options); @@ -317,7 +316,7 @@ public static function formatTrace($backtrace, $options = []) 'line' => '??', 'file' => '[internal]', 'class' => null, - 'function' => '[main]' + 'function' => '[main]', ]; for ($i = $options['start']; $i < $count && $i < $options['depth']; $i++) { @@ -409,7 +408,7 @@ public static function trimPath($path) * @param int $context Number of lines of context to extract above and below $line. * @return array Set of lines highlighted * @see https://secure.php.net/highlight_string - * @link https://book.cakephp.org/3.0/en/development/debugging.html#getting-an-excerpt-from-a-file + * @link https://book.cakephp.org/3/en/development/debugging.html#getting-an-excerpt-from-a-file */ public static function excerpt($file, $line, $context = 2) { diff --git a/app/vendor/cakephp/cakephp/src/Error/ErrorHandler.php b/app/vendor/cakephp/cakephp/src/Error/ErrorHandler.php index 633b35f05..18ef14c70 100644 --- a/app/vendor/cakephp/cakephp/src/Error/ErrorHandler.php +++ b/app/vendor/cakephp/cakephp/src/Error/ErrorHandler.php @@ -23,12 +23,12 @@ /** * Error Handler provides basic error and exception handling for your application. It captures and - * handles all unhandled exceptions and errors. Displays helpful framework errors when debug > 1. + * handles all unhandled exceptions and errors. Displays helpful framework errors when debug mode is on. * * ### Uncaught exceptions * - * When debug < 1 a CakeException will render 404 or 500 errors. If an uncaught exception is thrown - * and it is a type that ErrorHandler does not know about it will be treated as a 500 error. + * When debug mode is off a ExceptionRenderer will render 404 or 500 errors. If an uncaught exception is thrown + * and it is a type that ExceptionRenderer does not know about it will be treated as a 500 error. * * ### Implementing application specific exception handling * @@ -164,7 +164,6 @@ protected function _clearOutput() * The PHP5 part will be removed with 4.0. * * @param \Throwable|\Exception $exception Exception. - * * @return void */ protected function _logInternalError($exception) @@ -172,9 +171,11 @@ protected function _logInternalError($exception) // Disable trace for internal errors. $this->_options['trace'] = false; $message = sprintf( - "[%s] %s\n%s", // Keeping same message format + "[%s] %s (%s:%s)\n%s", // Keeping same message format get_class($exception), $exception->getMessage(), + $exception->getFile(), + $exception->getLine(), $exception->getTraceAsString() ); trigger_error($message, E_USER_ERROR); diff --git a/app/vendor/cakephp/cakephp/src/Error/ExceptionRenderer.php b/app/vendor/cakephp/cakephp/src/Error/ExceptionRenderer.php index 1b4194640..7e8bd9095 100644 --- a/app/vendor/cakephp/cakephp/src/Error/ExceptionRenderer.php +++ b/app/vendor/cakephp/cakephp/src/Error/ExceptionRenderer.php @@ -35,7 +35,7 @@ * Exception Renderer. * * Captures and handles all unhandled exceptions. Displays helpful framework errors when debug is true. - * When debug is false a CakeException will render 404 or 500 errors. If an uncaught exception is thrown + * When debug is false a ExceptionRenderer will render 404 or 500 errors. If an uncaught exception is thrown * and it is a type that ExceptionHandler does not know about it will be treated as a 500 error. * * ### Implementing application specific exception rendering @@ -50,7 +50,6 @@ */ class ExceptionRenderer implements ExceptionRendererInterface { - /** * The exception being handled. * @@ -162,7 +161,7 @@ protected function _getController() $class = App::className('Error', 'Controller', 'Controller'); } - /* @var \Cake\Controller\Controller $controller */ + /** @var \Cake\Controller\Controller $controller */ $controller = new $class($request, $response); $controller->startupProcess(); $startup = true; @@ -220,14 +219,14 @@ public function render() 'url' => h($url), 'error' => $unwrapped, 'code' => $code, - '_serialize' => ['message', 'url', 'code'] + '_serialize' => ['message', 'url', 'code'], ]; $isDebug = Configure::read('debug'); if ($isDebug) { $viewVars['trace'] = Debugger::formatTrace($unwrapped->getTrace(), [ 'format' => 'array', - 'args' => false + 'args' => false, ]); $viewVars['file'] = $exception->getFile() ?: 'null'; $viewVars['line'] = $exception->getLine() ?: 'null'; @@ -294,7 +293,8 @@ protected function _message(Exception $exception, $code) $exception = $this->_unwrap($exception); $message = $exception->getMessage(); - if (!Configure::read('debug') && + if ( + !Configure::read('debug') && !($exception instanceof HttpException) ) { if ($code < 500) { @@ -429,7 +429,7 @@ protected function _shutdown() } $args = [ 'request' => $this->controller->request, - 'response' => $this->controller->response + 'response' => $this->controller->response, ]; $result = $dispatcher->dispatchEvent('Dispatcher.afterDispatch', $args); diff --git a/app/vendor/cakephp/cakephp/src/Error/FatalErrorException.php b/app/vendor/cakephp/cakephp/src/Error/FatalErrorException.php index 4613e8e47..5253a9916 100644 --- a/app/vendor/cakephp/cakephp/src/Error/FatalErrorException.php +++ b/app/vendor/cakephp/cakephp/src/Error/FatalErrorException.php @@ -19,7 +19,6 @@ */ class FatalErrorException extends Exception { - /** * Constructor * diff --git a/app/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php b/app/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php index e99342c5d..ab3f80b03 100644 --- a/app/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php +++ b/app/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php @@ -80,6 +80,10 @@ public function __construct($exceptionRenderer = null, array $config = []) $config = $config ?: Configure::read('Error'); $this->setConfig($config); + + if (PHP_VERSION_ID >= 70400 && Configure::read('debug')) { + ini_set('zend.exception_ignore_args', 0); + } } /** @@ -130,7 +134,6 @@ public function handleException($exception, $request, $response) /** * @param \Psr\Http\Message\ResponseInterface $response The response - * * @return \Psr\Http\Message\ResponseInterface A response */ protected function handleInternalError($response) @@ -230,10 +233,12 @@ protected function getMessage($request, $exception) protected function getMessageForException($exception, $isPrevious = false) { $message = sprintf( - '%s[%s] %s', + '%s[%s] %s (%s:%s)', $isPrevious ? "\nCaused by: " : '', get_class($exception), - $exception->getMessage() + $exception->getMessage(), + $exception->getFile(), + $exception->getLine() ); $debug = Configure::read('debug'); diff --git a/app/vendor/cakephp/cakephp/src/Error/PHP7ErrorException.php b/app/vendor/cakephp/cakephp/src/Error/PHP7ErrorException.php index 165b32bc6..a8b853beb 100644 --- a/app/vendor/cakephp/cakephp/src/Error/PHP7ErrorException.php +++ b/app/vendor/cakephp/cakephp/src/Error/PHP7ErrorException.php @@ -21,7 +21,6 @@ */ class PHP7ErrorException extends Exception { - /** * The wrapped error object * diff --git a/app/vendor/cakephp/cakephp/src/Event/Decorator/AbstractDecorator.php b/app/vendor/cakephp/cakephp/src/Event/Decorator/AbstractDecorator.php index e0cb24108..762896f74 100644 --- a/app/vendor/cakephp/cakephp/src/Event/Decorator/AbstractDecorator.php +++ b/app/vendor/cakephp/cakephp/src/Event/Decorator/AbstractDecorator.php @@ -19,7 +19,6 @@ */ abstract class AbstractDecorator { - /** * Callable * diff --git a/app/vendor/cakephp/cakephp/src/Event/Decorator/ConditionDecorator.php b/app/vendor/cakephp/cakephp/src/Event/Decorator/ConditionDecorator.php index 7db1afb57..5784225f3 100644 --- a/app/vendor/cakephp/cakephp/src/Event/Decorator/ConditionDecorator.php +++ b/app/vendor/cakephp/cakephp/src/Event/Decorator/ConditionDecorator.php @@ -25,7 +25,6 @@ */ class ConditionDecorator extends AbstractDecorator { - /** * {@inheritDoc} */ diff --git a/app/vendor/cakephp/cakephp/src/Event/Decorator/SubjectFilterDecorator.php b/app/vendor/cakephp/cakephp/src/Event/Decorator/SubjectFilterDecorator.php index eb32f826c..b25b5c9a9 100644 --- a/app/vendor/cakephp/cakephp/src/Event/Decorator/SubjectFilterDecorator.php +++ b/app/vendor/cakephp/cakephp/src/Event/Decorator/SubjectFilterDecorator.php @@ -28,7 +28,6 @@ */ class SubjectFilterDecorator extends AbstractDecorator { - /** * {@inheritDoc} */ diff --git a/app/vendor/cakephp/cakephp/src/Event/Event.php b/app/vendor/cakephp/cakephp/src/Event/Event.php index 9c599a245..ae5c87287 100644 --- a/app/vendor/cakephp/cakephp/src/Event/Event.php +++ b/app/vendor/cakephp/cakephp/src/Event/Event.php @@ -19,7 +19,6 @@ */ class Event implements EventInterface { - /** * Name of the event * diff --git a/app/vendor/cakephp/cakephp/src/Event/EventDispatcherInterface.php b/app/vendor/cakephp/cakephp/src/Event/EventDispatcherInterface.php index 9119ad1e1..6e424a5d0 100644 --- a/app/vendor/cakephp/cakephp/src/Event/EventDispatcherInterface.php +++ b/app/vendor/cakephp/cakephp/src/Event/EventDispatcherInterface.php @@ -38,7 +38,6 @@ interface EventDispatcherInterface * it can be read by listeners. * @param object|null $subject The object that this event applies to * ($this by default). - * * @return \Cake\Event\Event */ public function dispatchEvent($name, $data = null, $subject = null); diff --git a/app/vendor/cakephp/cakephp/src/Event/EventDispatcherTrait.php b/app/vendor/cakephp/cakephp/src/Event/EventDispatcherTrait.php index 08c403c06..28dfcef2b 100644 --- a/app/vendor/cakephp/cakephp/src/Event/EventDispatcherTrait.php +++ b/app/vendor/cakephp/cakephp/src/Event/EventDispatcherTrait.php @@ -19,7 +19,6 @@ */ trait EventDispatcherTrait { - /** * Instance of the Cake\Event\EventManager this object is using * to dispatch inner events. @@ -101,7 +100,6 @@ public function setEventManager(EventManager $eventManager) * it can be read by listeners. * @param object|null $subject The object that this event applies to * ($this by default). - * * @return \Cake\Event\Event */ public function dispatchEvent($name, $data = null, $subject = null) diff --git a/app/vendor/cakephp/cakephp/src/Event/EventList.php b/app/vendor/cakephp/cakephp/src/Event/EventList.php index 112329d40..0410c564f 100644 --- a/app/vendor/cakephp/cakephp/src/Event/EventList.php +++ b/app/vendor/cakephp/cakephp/src/Event/EventList.php @@ -22,7 +22,6 @@ */ class EventList implements ArrayAccess, Countable { - /** * Events list * diff --git a/app/vendor/cakephp/cakephp/src/Event/EventListenerInterface.php b/app/vendor/cakephp/cakephp/src/Event/EventListenerInterface.php index b117237b6..9e4389399 100644 --- a/app/vendor/cakephp/cakephp/src/Event/EventListenerInterface.php +++ b/app/vendor/cakephp/cakephp/src/Event/EventListenerInterface.php @@ -20,7 +20,6 @@ */ interface EventListenerInterface { - /** * Returns a list of events this object is implementing. When the class is registered * in an event manager, each individual method will be associated with the respective event. diff --git a/app/vendor/cakephp/cakephp/src/Event/EventManager.php b/app/vendor/cakephp/cakephp/src/Event/EventManager.php index 2e5cd7d18..b452ecec0 100644 --- a/app/vendor/cakephp/cakephp/src/Event/EventManager.php +++ b/app/vendor/cakephp/cakephp/src/Event/EventManager.php @@ -24,7 +24,6 @@ */ class EventManager implements EventManagerInterface { - /** * The default priority queue value for new, attached listeners * @@ -106,7 +105,6 @@ public static function instance($manager = null) * @param array $options used to set the `priority` flag to the listener. In the future more options may be added. * Priorities are treated as queues. Lower values are called before higher ones, and multiple attachments * added to the same priority queue will be treated in the order of insertion. - * * @return void * @throws \InvalidArgumentException When event key is missing or callable is not an * instance of Cake\Event\EventListenerInterface. @@ -141,7 +139,7 @@ public function on($eventKey = null, $options = [], $callable = null) $argCount = func_num_args(); if ($argCount === 2) { $this->_listeners[$eventKey][static::$defaultPriority][] = [ - 'callable' => $options + 'callable' => $options, ]; return $this; @@ -149,7 +147,7 @@ public function on($eventKey = null, $options = [], $callable = null) if ($argCount === 3) { $priority = isset($options['priority']) ? $options['priority'] : static::$defaultPriority; $this->_listeners[$eventKey][$priority][] = [ - 'callable' => $callable + 'callable' => $callable, ]; return $this; @@ -343,10 +341,10 @@ public function dispatch($event) * Calls a listener. * * @param callable $listener The listener to trigger. - * @param \Cake\Event\Event $event Event instance. + * @param \Cake\Event\EventInterface $event Event instance. * @return mixed The result of the $listener function. */ - protected function _callListener(callable $listener, Event $event) + protected function _callListener(callable $listener, EventInterface $event) { $data = $event->getData(); diff --git a/app/vendor/cakephp/cakephp/src/Event/EventManagerInterface.php b/app/vendor/cakephp/cakephp/src/Event/EventManagerInterface.php index a5979cd8c..236eedf11 100644 --- a/app/vendor/cakephp/cakephp/src/Event/EventManagerInterface.php +++ b/app/vendor/cakephp/cakephp/src/Event/EventManagerInterface.php @@ -18,7 +18,6 @@ */ interface EventManagerInterface { - /** * Adds a new listener to an event. * @@ -52,7 +51,6 @@ interface EventManagerInterface * added to the same priority queue will be treated in the order of insertion. * * @param callable|null $callable The callable function you want invoked. - * * @return $this * @throws \InvalidArgumentException When event key is missing or callable is not an * instance of Cake\Event\EventListenerInterface. diff --git a/app/vendor/cakephp/cakephp/src/Event/EventManagerTrait.php b/app/vendor/cakephp/cakephp/src/Event/EventManagerTrait.php index efc0a5abe..4425af18c 100644 --- a/app/vendor/cakephp/cakephp/src/Event/EventManagerTrait.php +++ b/app/vendor/cakephp/cakephp/src/Event/EventManagerTrait.php @@ -21,6 +21,5 @@ */ trait EventManagerTrait { - use EventDispatcherTrait; } diff --git a/app/vendor/cakephp/cakephp/src/Event/README.md b/app/vendor/cakephp/cakephp/src/Event/README.md index 8ee7261a7..e77b63684 100644 --- a/app/vendor/cakephp/cakephp/src/Event/README.md +++ b/app/vendor/cakephp/cakephp/src/Event/README.md @@ -48,4 +48,4 @@ in separate objects that focus on those concerns. ## Documentation -Please make sure you check the [official documentation](https://book.cakephp.org/3.0/en/core-libraries/events.html) +Please make sure you check the [official documentation](https://book.cakephp.org/3/en/core-libraries/events.html) diff --git a/app/vendor/cakephp/cakephp/src/Event/composer.json b/app/vendor/cakephp/cakephp/src/Event/composer.json index e984d41e2..c0fd41185 100644 --- a/app/vendor/cakephp/cakephp/src/Event/composer.json +++ b/app/vendor/cakephp/cakephp/src/Event/composer.json @@ -23,7 +23,7 @@ "source": "https://github.com/cakephp/event" }, "require": { - "php": ">=5.6.0", + "php": ">=5.6.0,<8.0.0", "cakephp/core": "^3.6.0" }, "autoload": { diff --git a/app/vendor/cakephp/cakephp/src/Filesystem/File.php b/app/vendor/cakephp/cakephp/src/Filesystem/File.php index b39dc999b..21c02c026 100644 --- a/app/vendor/cakephp/cakephp/src/Filesystem/File.php +++ b/app/vendor/cakephp/cakephp/src/Filesystem/File.php @@ -22,12 +22,11 @@ */ class File { - /** * Folder object of the file * * @var \Cake\Filesystem\Folder - * @link https://book.cakephp.org/3.0/en/core-libraries/file-folder.html + * @link https://book.cakephp.org/3/en/core-libraries/file-folder.html */ public $Folder; @@ -35,7 +34,7 @@ class File * File name * * @var string - * https://book.cakephp.org/3.0/en/core-libraries/file-folder.html#Cake\Filesystem\File::$name + * https://book.cakephp.org/3/en/core-libraries/file-folder.html#Cake\Filesystem\File::$name */ public $name; @@ -43,7 +42,7 @@ class File * File info * * @var array - * https://book.cakephp.org/3.0/en/core-libraries/file-folder.html#Cake\Filesystem\File::$info + * https://book.cakephp.org/3/en/core-libraries/file-folder.html#Cake\Filesystem\File::$info */ public $info = []; @@ -51,7 +50,7 @@ class File * Holds the file handler resource if the file is opened * * @var resource|null - * https://book.cakephp.org/3.0/en/core-libraries/file-folder.html#Cake\Filesystem\File::$handle + * https://book.cakephp.org/3/en/core-libraries/file-folder.html#Cake\Filesystem\File::$handle */ public $handle; @@ -59,7 +58,7 @@ class File * Enable locking for file reading and writing * * @var bool|null - * https://book.cakephp.org/3.0/en/core-libraries/file-folder.html#Cake\Filesystem\File::$lock + * https://book.cakephp.org/3/en/core-libraries/file-folder.html#Cake\Filesystem\File::$lock */ public $lock; @@ -69,7 +68,7 @@ class File * Current file's absolute path * * @var string|null - * https://book.cakephp.org/3.0/en/core-libraries/file-folder.html#Cake\Filesystem\File::$path + * https://book.cakephp.org/3/en/core-libraries/file-folder.html#Cake\Filesystem\File::$path */ public $path; @@ -79,7 +78,7 @@ class File * @param string $path Path to file * @param bool $create Create file if it does not exist (if true) * @param int $mode Mode to apply to the folder holding the file - * @link https://book.cakephp.org/3.0/en/core-libraries/file-folder.html#file-api + * @link https://book.cakephp.org/3/en/core-libraries/file-folder.html#file-api */ public function __construct($path, $create = false, $mode = 0755) { @@ -140,14 +139,14 @@ public function open($mode = 'r', $force = false) /** * Return the contents of this file as a string. * - * @param string|bool $bytes where to start + * @param int|false $lengthInBytes The length to read in bytes or `false` for the full file. Defaults to `false`. * @param string $mode A `fread` compatible mode. * @param bool $force If true then the file will be re-opened even if its already opened, otherwise it won't - * @return string|false string on success, false on failure + * @return string|false String on success, false on failure */ - public function read($bytes = false, $mode = 'rb', $force = false) + public function read($lengthInBytes = false, $mode = 'rb', $force = false) { - if ($bytes === false && $this->lock === null) { + if ($lengthInBytes === false && $this->lock === null) { return file_get_contents($this->path); } if ($this->open($mode, $force) === false) { @@ -156,8 +155,8 @@ public function read($bytes = false, $mode = 'rb', $force = false) if ($this->lock !== null && flock($this->handle, LOCK_SH) === false) { return false; } - if (is_int($bytes)) { - return fread($this->handle, $bytes); + if (is_int($lengthInBytes)) { + return fread($this->handle, $lengthInBytes); } $data = ''; @@ -168,7 +167,7 @@ public function read($bytes = false, $mode = 'rb', $force = false) if ($this->lock !== null) { flock($this->handle, LOCK_UN); } - if ($bytes === false) { + if ($lengthInBytes === false) { $this->close(); } @@ -363,7 +362,7 @@ protected static function _basename($path, $ext = null) { // check for multibyte string and use basename() if not found if (mb_strlen($path) === strlen($path)) { - return ($ext === null)? basename($path) : basename($path, $ext); + return ($ext === null) ? basename($path) : basename($path, $ext); } $splInfo = new SplFileInfo($path); @@ -376,7 +375,7 @@ protected static function _basename($path, $ext = null) $new = preg_replace("/({$ext})$/u", "", $name); // basename of '/etc/.d' is '.d' not '' - return ($new === '')? $name : $new; + return ($new === '') ? $name : $new; } /** @@ -591,7 +590,7 @@ public function copy($dest, $overwrite = true) * Gets the mime type of the file. Uses the finfo extension if * it's available, otherwise falls back to mime_content_type(). * - * @return false|string The mimetype of the file, or false if reading fails. + * @return string|false The mimetype of the file, or false if reading fails. */ public function mime() { diff --git a/app/vendor/cakephp/cakephp/src/Filesystem/Folder.php b/app/vendor/cakephp/cakephp/src/Filesystem/Folder.php index b425cbfe2..9a81de315 100644 --- a/app/vendor/cakephp/cakephp/src/Filesystem/Folder.php +++ b/app/vendor/cakephp/cakephp/src/Filesystem/Folder.php @@ -24,11 +24,10 @@ * Folder structure browser, lists folders and files. * Provides an Object interface for Common directory related tasks. * - * @link https://book.cakephp.org/3.0/en/core-libraries/file-folder.html#folder-api + * @link https://book.cakephp.org/3/en/core-libraries/file-folder.html#folder-api */ class Folder { - /** * Default scheme for Folder::copy * Recursively merges subfolders with the same name @@ -86,16 +85,18 @@ class Folder * Mode to be used on create. Does nothing on windows platforms. * * @var int - * https://book.cakephp.org/3.0/en/core-libraries/file-folder.html#Cake\Filesystem\Folder::$mode + * https://book.cakephp.org/3/en/core-libraries/file-folder.html#Cake\Filesystem\Folder::$mode */ public $mode = 0755; /** * Functions array to be called depending on the sort type chosen. + * + * @var string[] */ protected $_fsorts = [ self::SORT_NAME => 'getPathname', - self::SORT_TIME => 'getCTime' + self::SORT_TIME => 'getCTime', ]; /** @@ -167,7 +168,7 @@ public function pwd() * Change directory to $path. * * @param string $path Path to the directory to change to - * @return string|bool The new path. Returns false on failure + * @return string|false The new path. Returns false on failure */ public function cd($path) { @@ -354,7 +355,6 @@ public static function isRegisteredStreamWrapper($path) * * @param string $path Path to check * @return string Set of slashes ("\\" or "/") - * * @deprecated 3.7.0 This method will be removed in 4.0.0. Use correctSlashFor() instead. */ public static function normalizePath($path) @@ -582,6 +582,8 @@ public function tree($path = null, $exceptions = false, $type = null) $directory = new RecursiveDirectoryIterator($path, RecursiveDirectoryIterator::KEY_AS_PATHNAME | RecursiveDirectoryIterator::CURRENT_AS_SELF); $iterator = new RecursiveIteratorIterator($directory, RecursiveIteratorIterator::SELF_FIRST); } catch (Exception $e) { + unset($directory, $iterator); + if ($type === null) { return [[], []]; } @@ -597,12 +599,14 @@ public function tree($path = null, $exceptions = false, $type = null) if ($skipHidden) { $subPathName = $fsIterator->getSubPathname(); if ($subPathName[0] === '.' || strpos($subPathName, DIRECTORY_SEPARATOR . '.') !== false) { + unset($fsIterator); continue; } } /** @var \FilesystemIterator $item */ $item = $fsIterator->current(); if (!empty($exceptions) && isset($exceptions[$item->getFilename()])) { + unset($fsIterator, $item); continue; } @@ -611,7 +615,15 @@ public function tree($path = null, $exceptions = false, $type = null) } elseif ($item->isDir() && !$item->isDot()) { $directories[] = $itemPath; } + + // inner iterators need to be unset too in order for locks on parents to be released + unset($fsIterator, $item); } + + // unsetting iterators helps releasing possible locks in certain environments, + // which could otherwise make `rmdir()` fail + unset($directory, $iterator); + if ($type === null) { return [$directories, $files]; } @@ -731,6 +743,8 @@ public function delete($path = null) $directory = new RecursiveDirectoryIterator($path, RecursiveDirectoryIterator::CURRENT_AS_SELF); $iterator = new RecursiveIteratorIterator($directory, RecursiveIteratorIterator::CHILD_FIRST); } catch (Exception $e) { + unset($directory, $iterator); + return false; } @@ -752,11 +766,20 @@ public function delete($path = null) } else { $this->_errors[] = sprintf('%s NOT removed', $filePath); + unset($directory, $iterator, $item); + return false; } } + + // inner iterators need to be unset too in order for locks on parents to be released + unset($item); } + // unsetting iterators helps releasing possible locks in certain environments, + // which could otherwise make `rmdir()` fail + unset($directory, $iterator); + $path = rtrim($path, DIRECTORY_SEPARATOR); //@codingStandardsIgnoreStart if (@rmdir($path)) { @@ -803,7 +826,7 @@ public function copy($options) 'mode' => $this->mode, 'skip' => [], 'scheme' => Folder::MERGE, - 'recursive' => true + 'recursive' => true, ]; $fromDir = $options['from']; diff --git a/app/vendor/cakephp/cakephp/src/Filesystem/README.md b/app/vendor/cakephp/cakephp/src/Filesystem/README.md index 769837df4..74ec083ea 100644 --- a/app/vendor/cakephp/cakephp/src/Filesystem/README.md +++ b/app/vendor/cakephp/cakephp/src/Filesystem/README.md @@ -32,4 +32,4 @@ foreach ($files as $file) { ## Documentation Please make sure you check the [official -documentation](https://book.cakephp.org/3.0/en/core-libraries/file-folder.html) +documentation](https://book.cakephp.org/3/en/core-libraries/file-folder.html) diff --git a/app/vendor/cakephp/cakephp/src/Filesystem/composer.json b/app/vendor/cakephp/cakephp/src/Filesystem/composer.json index e5dcb0702..62dc4ffec 100644 --- a/app/vendor/cakephp/cakephp/src/Filesystem/composer.json +++ b/app/vendor/cakephp/cakephp/src/Filesystem/composer.json @@ -23,7 +23,7 @@ "source": "https://github.com/cakephp/filesystem" }, "require": { - "php": ">=5.6.0", + "php": ">=5.6.0,<8.0.0", "cakephp/core": "^3.6.0" }, "autoload": { diff --git a/app/vendor/cakephp/cakephp/src/Form/Form.php b/app/vendor/cakephp/cakephp/src/Form/Form.php index 019950e53..bbff3c653 100644 --- a/app/vendor/cakephp/cakephp/src/Form/Form.php +++ b/app/vendor/cakephp/cakephp/src/Form/Form.php @@ -45,13 +45,6 @@ */ class Form implements EventListenerInterface, EventDispatcherInterface, ValidatorAwareInterface { - /** - * Schema class. - * - * @var string - */ - protected $_schemaClass = Schema::class; - use EventDispatcherTrait; use ValidatorAwareTrait; @@ -69,6 +62,13 @@ class Form implements EventListenerInterface, EventDispatcherInterface, Validato */ const BUILD_VALIDATOR_EVENT = 'Form.buildValidator'; + /** + * Schema class. + * + * @var string + */ + protected $_schemaClass = Schema::class; + /** * The schema used by this form. * @@ -142,7 +142,7 @@ public function implementedEvents() public function schema(Schema $schema = null) { if ($schema === null && empty($this->_schema)) { - $schema = $this->_buildSchema(new $this->_schemaClass); + $schema = $this->_buildSchema(new $this->_schemaClass()); } if ($schema) { $this->_schema = $schema; @@ -185,7 +185,7 @@ public function validator(Validator $validator = null) ); if ($validator === null && empty($this->_validator)) { - $validator = $this->_buildValidator(new $this->_validatorClass); + $validator = $this->_buildValidator(new $this->_validatorClass()); } if ($validator) { $this->_validator = $validator; @@ -239,7 +239,7 @@ public function validate(array $data) $validator = $this->validator(); } } - $this->_errors = $validator->errors($data); + $this->_errors = $validator->validate($data); return count($this->_errors) === 0; } @@ -373,7 +373,7 @@ public function __debugInfo() $special = [ '_schema' => $this->schema()->__debugInfo(), '_errors' => $this->getErrors(), - '_validator' => $this->getValidator()->__debugInfo() + '_validator' => $this->getValidator()->__debugInfo(), ]; return $special + get_object_vars($this); diff --git a/app/vendor/cakephp/cakephp/src/Form/README.md b/app/vendor/cakephp/cakephp/src/Form/README.md index 62d2b1d6f..fe8caef68 100644 --- a/app/vendor/cakephp/cakephp/src/Form/README.md +++ b/app/vendor/cakephp/cakephp/src/Form/README.md @@ -60,4 +60,4 @@ $errors = $contact->getErrors(); ## Documentation -Please make sure you check the [official documentation](https://book.cakephp.org/3.0/en/core-libraries/form.html) +Please make sure you check the [official documentation](https://book.cakephp.org/3/en/core-libraries/form.html) diff --git a/app/vendor/cakephp/cakephp/src/Form/Schema.php b/app/vendor/cakephp/cakephp/src/Form/Schema.php index 11d927f44..db30fa203 100644 --- a/app/vendor/cakephp/cakephp/src/Form/Schema.php +++ b/app/vendor/cakephp/cakephp/src/Form/Schema.php @@ -19,7 +19,6 @@ */ class Schema { - /** * The fields in this schema. * @@ -100,7 +99,7 @@ public function fields() * Get the attributes for a given field. * * @param string $name The field name. - * @return null|array The attributes for a field, or null. + * @return array|null The attributes for a field, or null. */ public function field($name) { @@ -136,7 +135,7 @@ public function fieldType($name) public function __debugInfo() { return [ - '_fields' => $this->_fields + '_fields' => $this->_fields, ]; } } diff --git a/app/vendor/cakephp/cakephp/src/Form/composer.json b/app/vendor/cakephp/cakephp/src/Form/composer.json index 5e1dfdc92..f186aa5d8 100644 --- a/app/vendor/cakephp/cakephp/src/Form/composer.json +++ b/app/vendor/cakephp/cakephp/src/Form/composer.json @@ -21,7 +21,7 @@ "source": "https://github.com/cakephp/form" }, "require": { - "php": ">=5.6.0", + "php": ">=5.6.0,<8.0.0", "cakephp/event": "^3.6.0", "cakephp/validation": "^3.6.0" }, diff --git a/app/vendor/cakephp/cakephp/src/Http/BaseApplication.php b/app/vendor/cakephp/cakephp/src/Http/BaseApplication.php index e514204da..35a3677d9 100644 --- a/app/vendor/cakephp/cakephp/src/Http/BaseApplication.php +++ b/app/vendor/cakephp/cakephp/src/Http/BaseApplication.php @@ -12,11 +12,13 @@ * @since 3.3.0 * @license https://opensource.org/licenses/mit-license.php MIT License */ + namespace Cake\Http; use Cake\Core\App; use Cake\Core\BasePlugin; use Cake\Core\ConsoleApplicationInterface; +use Cake\Core\Exception\MissingPluginException; use Cake\Core\HttpApplicationInterface; use Cake\Core\Plugin; use Cake\Core\PluginApplicationInterface; @@ -42,7 +44,6 @@ abstract class BaseApplication implements HttpApplicationInterface, PluginApplicationInterface { - use EventDispatcherTrait; /** @@ -109,6 +110,26 @@ public function addPlugin($name, array $config = []) return $this; } + /** + * Add an optional plugin + * + * If it isn't available, ignore it. + * + * @param string|\Cake\Core\PluginInterface $name The plugin name or plugin object. + * @param array $config The configuration data for the plugin if using a string for $name + * @return $this + */ + public function addOptionalPlugin($name, array $config = []) + { + try { + $this->addPlugin($name, $config); + } catch (MissingPluginException $e) { + // Do not halt if the plugin is missing + } + + return $this; + } + /** * Get the plugin collection in use. * diff --git a/app/vendor/cakephp/cakephp/src/Http/CallbackStream.php b/app/vendor/cakephp/cakephp/src/Http/CallbackStream.php index f6ecbff1e..64510cb1d 100644 --- a/app/vendor/cakephp/cakephp/src/Http/CallbackStream.php +++ b/app/vendor/cakephp/cakephp/src/Http/CallbackStream.php @@ -14,12 +14,12 @@ */ namespace Cake\Http; -use Zend\Diactoros\CallbackStream as BaseCallbackStream; +use Laminas\Diactoros\CallbackStream as BaseCallbackStream; /** * Implementation of PSR HTTP streams. * - * This differs from Zend\Diactoros\Callback stream in that + * This differs from Laminas\Diactoros\Callback stream in that * it allows the use of `echo` inside the callback, and gracefully * handles the callback not returning a string. * diff --git a/app/vendor/cakephp/cakephp/src/Http/Client.php b/app/vendor/cakephp/cakephp/src/Http/Client.php index ecc194dac..6848957ee 100644 --- a/app/vendor/cakephp/cakephp/src/Http/Client.php +++ b/app/vendor/cakephp/cakephp/src/Http/Client.php @@ -24,7 +24,7 @@ use Cake\Http\Cookie\CookieInterface; use Cake\Utility\Hash; use InvalidArgumentException; -use Zend\Diactoros\Uri; +use Laminas\Diactoros\Uri; /** * The end user interface for doing HTTP requests. @@ -114,6 +114,7 @@ class Client 'ssl_verify_depth' => 5, 'ssl_verify_host' => true, 'redirect' => false, + 'protocolVersion' => '1.1', ]; /** @@ -156,6 +157,7 @@ class Client * - adapter - The adapter class name or instance. Defaults to * \Cake\Http\Client\Adapter\Curl if `curl` extension is loaded else * \Cake\Http\Client\Adapter\Stream. + * - protocolVersion - The HTTP protocol version to use. Defaults to 1.1 * * @param array $config Config options for scoped clients. * @throws \InvalidArgumentException @@ -418,17 +420,16 @@ public function send(Request $request, $options = []) $handleRedirect = $response->isRedirect() && $redirects-- > 0; if ($handleRedirect) { $url = $request->getUri(); - $request = $this->_cookies->addToRequest($request, []); $location = $response->getHeaderLine('Location'); $locationUrl = $this->buildUrl($location, [], [ 'host' => $url->getHost(), 'port' => $url->getPort(), 'scheme' => $url->getScheme(), - 'protocolRelative' => true + 'protocolRelative' => true, ]); - $request = $request->withUri(new Uri($locationUrl)); + $request = $this->_cookies->addToRequest($request, []); } } while ($handleRedirect); @@ -475,7 +476,7 @@ public function buildUrl($url, $query = [], $options = []) 'host' => null, 'port' => null, 'scheme' => 'http', - 'protocolRelative' => false + 'protocolRelative' => false, ]; $options += $defaults; @@ -488,7 +489,7 @@ public function buildUrl($url, $query = [], $options = []) $defaultPorts = [ 'http' => 80, - 'https' => 443 + 'https' => 443, ]; $out = $options['scheme'] . '://' . $options['host']; if ($options['port'] && $options['port'] != $defaultPorts[$options['scheme']]) { @@ -519,6 +520,8 @@ protected function _createRequest($method, $url, $data, $options) } $request = new Request($url, $method, $headers, $data); + $request = $request->withProtocolVersion($this->getConfig('protocolVersion')); + $cookies = isset($options['cookies']) ? $options['cookies'] : []; /** @var \Cake\Http\Client\Request $request */ $request = $this->_cookies->addToRequest($request, $cookies); @@ -537,7 +540,7 @@ protected function _createRequest($method, $url, $data, $options) * or full mime-type. * * @param string $type short type alias or full mimetype. - * @return array Headers to set on the request. + * @return string[] Headers to set on the request. * @throws \Cake\Core\Exception\Exception When an unknown type alias is used. */ protected function _typeHeaders($type) @@ -545,7 +548,7 @@ protected function _typeHeaders($type) if (strpos($type, '/') !== false) { return [ 'Accept' => $type, - 'Content-Type' => $type + 'Content-Type' => $type, ]; } $typeMap = [ @@ -575,6 +578,7 @@ protected function _typeHeaders($type) protected function _addAuthentication(Request $request, $options) { $auth = $options['auth']; + /** @var \Cake\Http\Client\Auth\Basic $adapter */ $adapter = $this->_createAuth($auth, $options); $result = $adapter->authentication($request, $options['auth']); @@ -594,6 +598,7 @@ protected function _addAuthentication(Request $request, $options) protected function _addProxy(Request $request, $options) { $auth = $options['proxy']; + /** @var \Cake\Http\Client\Auth\Basic $adapter */ $adapter = $this->_createAuth($auth, $options); $result = $adapter->proxyAuthentication($request, $options['proxy']); diff --git a/app/vendor/cakephp/cakephp/src/Http/Client/Adapter/Curl.php b/app/vendor/cakephp/cakephp/src/Http/Client/Adapter/Curl.php index 3f1ace12f..ba39347ac 100644 --- a/app/vendor/cakephp/cakephp/src/Http/Client/Adapter/Curl.php +++ b/app/vendor/cakephp/cakephp/src/Http/Client/Adapter/Curl.php @@ -75,7 +75,7 @@ public function buildOptions(Request $request, array $options) CURLOPT_HTTP_VERSION => $this->getProtocolVersion($request), CURLOPT_RETURNTRANSFER => true, CURLOPT_HEADER => true, - CURLOPT_HTTPHEADER => $headers + CURLOPT_HTTPHEADER => $headers, ]; switch ($request->getMethod()) { case Request::METHOD_GET: @@ -86,6 +86,10 @@ public function buildOptions(Request $request, array $options) $out[CURLOPT_POST] = true; break; + case Request::METHOD_HEAD: + $out[CURLOPT_NOBODY] = true; + break; + default: $out[CURLOPT_POST] = true; $out[CURLOPT_CUSTOMREQUEST] = $request->getMethod(); @@ -96,6 +100,10 @@ public function buildOptions(Request $request, array $options) if ($body) { $body->rewind(); $out[CURLOPT_POSTFIELDS] = $body->getContents(); + // GET requests with bodies require custom request to be used. + if (isset($out[CURLOPT_HTTPGET])) { + $out[CURLOPT_CUSTOMREQUEST] = 'get'; + } } if (empty($options['ssl_cafile'])) { @@ -148,11 +156,15 @@ protected function getProtocolVersion(Request $request) return CURL_HTTP_VERSION_1_0; case '1.1': return CURL_HTTP_VERSION_1_1; + case '2': case '2.0': + if (defined('CURL_HTTP_VERSION_2TLS')) { + return CURL_HTTP_VERSION_2TLS; + } if (defined('CURL_HTTP_VERSION_2_0')) { return CURL_HTTP_VERSION_2_0; } - throw new HttpException('libcurl 7.33 needed for HTTP 2.0 support'); + throw new HttpException('libcurl 7.33 or greater required for HTTP/2 support'); } return CURL_HTTP_VERSION_NONE; diff --git a/app/vendor/cakephp/cakephp/src/Http/Client/Adapter/Stream.php b/app/vendor/cakephp/cakephp/src/Http/Client/Adapter/Stream.php index 8b0e4e2c0..125a74d6a 100644 --- a/app/vendor/cakephp/cakephp/src/Http/Client/Adapter/Stream.php +++ b/app/vendor/cakephp/cakephp/src/Http/Client/Adapter/Stream.php @@ -27,7 +27,6 @@ */ class Stream implements AdapterInterface { - /** * Context resource used by the stream API. * @@ -213,6 +212,7 @@ protected function _buildSslContext(Request $request, $options) 'ssl_allow_self_signed', 'ssl_cafile', 'ssl_local_cert', + 'ssl_local_pk', 'ssl_passphrase', ]; if (empty($options['ssl_cafile'])) { @@ -283,7 +283,6 @@ protected function _send(Request $request) * * @param array $headers Unparsed headers. * @param string $body The response body. - * * @return \Cake\Http\Client\Response */ protected function _buildResponse($headers, $body) diff --git a/app/vendor/cakephp/cakephp/src/Http/Client/Auth/Basic.php b/app/vendor/cakephp/cakephp/src/Http/Client/Auth/Basic.php index cb4f85dd6..4043b4167 100644 --- a/app/vendor/cakephp/cakephp/src/Http/Client/Auth/Basic.php +++ b/app/vendor/cakephp/cakephp/src/Http/Client/Auth/Basic.php @@ -23,7 +23,6 @@ */ class Basic { - /** * Add Authorization header to the request. * @@ -36,6 +35,7 @@ public function authentication(Request $request, array $credentials) { if (isset($credentials['username'], $credentials['password'])) { $value = $this->_generateHeader($credentials['username'], $credentials['password']); + /** @var \Cake\Http\Client\Request $request */ $request = $request->withHeader('Authorization', $value); } @@ -54,6 +54,7 @@ public function proxyAuthentication(Request $request, array $credentials) { if (isset($credentials['username'], $credentials['password'])) { $value = $this->_generateHeader($credentials['username'], $credentials['password']); + /** @var \Cake\Http\Client\Request $request */ $request = $request->withHeader('Proxy-Authorization', $value); } diff --git a/app/vendor/cakephp/cakephp/src/Http/Client/Auth/Digest.php b/app/vendor/cakephp/cakephp/src/Http/Client/Auth/Digest.php index 0e110952f..e374e3511 100644 --- a/app/vendor/cakephp/cakephp/src/Http/Client/Auth/Digest.php +++ b/app/vendor/cakephp/cakephp/src/Http/Client/Auth/Digest.php @@ -24,7 +24,6 @@ */ class Digest { - /** * Instance of Cake\Http\Client * diff --git a/app/vendor/cakephp/cakephp/src/Http/Client/Auth/Oauth.php b/app/vendor/cakephp/cakephp/src/Http/Client/Auth/Oauth.php index 16861a2f6..ef22138c9 100644 --- a/app/vendor/cakephp/cakephp/src/Http/Client/Auth/Oauth.php +++ b/app/vendor/cakephp/cakephp/src/Http/Client/Auth/Oauth.php @@ -30,7 +30,6 @@ */ class Oauth { - /** * Add headers for Oauth authorization. * @@ -139,10 +138,14 @@ protected function _hmacSha1($request, $credentials) 'oauth_timestamp' => $timestamp, 'oauth_signature_method' => 'HMAC-SHA1', 'oauth_token' => $credentials['token'], - 'oauth_consumer_key' => $credentials['consumerKey'], + 'oauth_consumer_key' => $this->_encode($credentials['consumerKey']), ]; $baseString = $this->baseString($request, $values); + // Consumer key should only be encoded for base string calculation as + // auth header generation already encodes independently + $values['oauth_consumer_key'] = $credentials['consumerKey']; + if (isset($credentials['realm'])) { $values['oauth_realm'] = $credentials['realm']; } @@ -165,7 +168,6 @@ protected function _hmacSha1($request, $credentials) * @param \Cake\Http\Client\Request $request The request object. * @param array $credentials Authentication credentials. * @return string - * * @throws \RuntimeException */ protected function _rsaSha1($request, $credentials) diff --git a/app/vendor/cakephp/cakephp/src/Http/Client/CookieCollection.php b/app/vendor/cakephp/cakephp/src/Http/Client/CookieCollection.php index a93396775..387f63924 100644 --- a/app/vendor/cakephp/cakephp/src/Http/Client/CookieCollection.php +++ b/app/vendor/cakephp/cakephp/src/Http/Client/CookieCollection.php @@ -26,7 +26,6 @@ */ class CookieCollection extends BaseCollection { - /** * {@inheritDoc} */ @@ -112,7 +111,7 @@ protected function convertCookieToArray(CookieInterface $cookie) 'domain' => $cookie->getDomain(), 'secure' => $cookie->isSecure(), 'httponly' => $cookie->isHttpOnly(), - 'expires' => $cookie->getExpiresTimestamp() + 'expires' => $cookie->getExpiresTimestamp(), ]; } } diff --git a/app/vendor/cakephp/cakephp/src/Http/Client/FormData.php b/app/vendor/cakephp/cakephp/src/Http/Client/FormData.php index 50e878f18..2b6124ae5 100644 --- a/app/vendor/cakephp/cakephp/src/Http/Client/FormData.php +++ b/app/vendor/cakephp/cakephp/src/Http/Client/FormData.php @@ -25,7 +25,6 @@ */ class FormData implements Countable { - /** * Boundary marker. * @@ -231,7 +230,7 @@ public function contentType() return 'application/x-www-form-urlencoded'; } - return 'multipart/form-data; boundary="' . $this->boundary() . '"'; + return 'multipart/form-data; boundary=' . $this->boundary(); } /** @@ -250,7 +249,7 @@ public function __toString() $out .= (string)$part; $out .= "\r\n"; } - $out .= "--$boundary--\r\n\r\n"; + $out .= "--$boundary--\r\n"; return $out; } diff --git a/app/vendor/cakephp/cakephp/src/Http/Client/FormDataPart.php b/app/vendor/cakephp/cakephp/src/Http/Client/FormDataPart.php index 6a5d4c892..d30f778d3 100644 --- a/app/vendor/cakephp/cakephp/src/Http/Client/FormDataPart.php +++ b/app/vendor/cakephp/cakephp/src/Http/Client/FormDataPart.php @@ -13,6 +13,9 @@ */ namespace Cake\Http\Client; +use Cake\Utility\Inflector; +use Cake\Utility\Text; + /** * Contains the data and behavior for a single * part in a Multipart FormData request body. @@ -24,7 +27,6 @@ */ class FormDataPart { - /** * Name of the value. * @@ -74,18 +76,27 @@ class FormDataPart */ protected $_contentId; + /** + * The charset attribute for the Content-Disposition header fields + * + * @var string|null + */ + protected $_charset; + /** * Constructor * * @param string $name The name of the data. * @param string $value The value of the data. * @param string $disposition The type of disposition to use, defaults to form-data. + * @param string|null $charset The charset of the data. */ - public function __construct($name, $value, $disposition = 'form-data') + public function __construct($name, $value, $disposition = 'form-data', $charset = null) { $this->_name = $name; $this->_value = $value; $this->_disposition = $disposition; + $this->_charset = $charset; } /** @@ -94,7 +105,7 @@ public function __construct($name, $value, $disposition = 'form-data') * By passing in `false` you can disable the disposition * header from being added. * - * @param null|string $disposition Use null to get/string to set. + * @param string|null $disposition Use null to get/string to set. * @return string|null */ public function disposition($disposition = null) @@ -108,7 +119,7 @@ public function disposition($disposition = null) /** * Get/set the contentId for a part. * - * @param null|string $id The content id. + * @param string|null $id The content id. * @return string|null */ public function contentId($id = null) @@ -125,7 +136,7 @@ public function contentId($id = null) * Setting the filename to `false` will exclude it from the * generated output. * - * @param null|string $filename Use null to get/string to set. + * @param string|null $filename Use null to get/string to set. * @return string|null */ public function filename($filename = null) @@ -139,7 +150,7 @@ public function filename($filename = null) /** * Get/set the content type. * - * @param null|string $type Use null to get/string to set. + * @param string|null $type Use null to get/string to set. * @return string|null */ public function type($type) @@ -155,7 +166,7 @@ public function type($type) * * Useful when content bodies are in encodings like base64. * - * @param null|string $type The type of encoding the value has. + * @param string|null $type The type of encoding the value has. * @return string|null */ public function transferEncoding($type) @@ -199,10 +210,10 @@ public function __toString() if ($this->_disposition) { $out .= 'Content-Disposition: ' . $this->_disposition; if ($this->_name) { - $out .= '; name="' . $this->_name . '"'; + $out .= '; ' . $this->_headerParameterToString('name', $this->_name); } if ($this->_filename) { - $out .= '; filename="' . $this->_filename . '"'; + $out .= '; ' . $this->_headerParameterToString('filename', $this->_filename); } $out .= "\r\n"; } @@ -220,6 +231,27 @@ public function __toString() return $out; } + + /** + * Get the string for the header parameter. + * + * If the value contains non-ASCII letters an additional header indicating + * the charset encoding will be set. + * + * @param string $name The name of the header parameter + * @param string $value The value of the header parameter + * @return string + */ + protected function _headerParameterToString($name, $value) + { + $transliterated = Text::transliterate(str_replace('"', '', $value)); + $return = sprintf('%s="%s"', $name, $transliterated); + if ($this->_charset !== null && $value !== $transliterated) { + $return .= sprintf("; %s*=%s''%s", $name, strtolower($this->_charset), rawurlencode($value)); + } + + return $return; + } } // @deprecated 3.4.0 Add backwards compat alias. diff --git a/app/vendor/cakephp/cakephp/src/Http/Client/Message.php b/app/vendor/cakephp/cakephp/src/Http/Client/Message.php index 5b6dccd5c..9ad5dc227 100644 --- a/app/vendor/cakephp/cakephp/src/Http/Client/Message.php +++ b/app/vendor/cakephp/cakephp/src/Http/Client/Message.php @@ -23,7 +23,6 @@ */ class Message { - /** * HTTP 200 code * diff --git a/app/vendor/cakephp/cakephp/src/Http/Client/Request.php b/app/vendor/cakephp/cakephp/src/Http/Client/Request.php index b27686c84..1d259c538 100644 --- a/app/vendor/cakephp/cakephp/src/Http/Client/Request.php +++ b/app/vendor/cakephp/cakephp/src/Http/Client/Request.php @@ -14,9 +14,9 @@ namespace Cake\Http\Client; use Cake\Core\Exception\Exception; +use Laminas\Diactoros\RequestTrait; +use Laminas\Diactoros\Stream; use Psr\Http\Message\RequestInterface; -use Zend\Diactoros\RequestTrait; -use Zend\Diactoros\Stream; /** * Implements methods for HTTP requests. @@ -45,7 +45,7 @@ public function __construct($url = '', $method = self::METHOD_GET, array $header $this->uri = $this->createUri($url); $headers += [ 'Connection' => 'close', - 'User-Agent' => 'CakePHP' + 'User-Agent' => 'CakePHP', ]; $this->addHeaders($headers); $this->body($data); diff --git a/app/vendor/cakephp/cakephp/src/Http/Client/Response.php b/app/vendor/cakephp/cakephp/src/Http/Client/Response.php index 144ff9f81..3c9be24e6 100644 --- a/app/vendor/cakephp/cakephp/src/Http/Client/Response.php +++ b/app/vendor/cakephp/cakephp/src/Http/Client/Response.php @@ -17,10 +17,10 @@ // with the deprecated class in this namespace. use Cake\Http\Cookie\CookieCollection as CookiesCollection; use Cake\Http\Cookie\CookieInterface; +use Laminas\Diactoros\MessageTrait; +use Laminas\Diactoros\Stream; use Psr\Http\Message\ResponseInterface; use RuntimeException; -use Zend\Diactoros\MessageTrait; -use Zend\Diactoros\Stream; /** * Implements methods for HTTP responses. @@ -240,12 +240,22 @@ public function isOk() static::STATUS_CREATED, static::STATUS_ACCEPTED, static::STATUS_NON_AUTHORITATIVE_INFORMATION, - static::STATUS_NO_CONTENT + static::STATUS_NO_CONTENT, ]; return in_array($this->code, $codes); } + /** + * Check if the response status code was in the 2xx range + * + * @return bool + */ + public function isSuccess() + { + return $this->code >= 200 && $this->code <= 299; + } + /** * Check if the response had a redirect status code. * @@ -491,7 +501,7 @@ protected function convertCookieToArray(CookieInterface $cookie) 'domain' => $cookie->getDomain(), 'secure' => $cookie->isSecure(), 'httponly' => $cookie->isHttpOnly(), - 'expires' => $cookie->getFormattedExpires() + 'expires' => $cookie->getFormattedExpires(), ]; } @@ -550,7 +560,7 @@ public function version() * For example to get the json data as an object: * * ``` - * $body = $response->body('json_decode'); + * $body = $response->getJson(); * ``` * * @param callable|null $parser The callback to use to decode @@ -610,7 +620,7 @@ protected function _getJson() /** * Get the response body as XML decoded data. * - * @return null|\SimpleXMLElement + * @return \SimpleXMLElement|null */ public function getXml() { @@ -620,7 +630,7 @@ public function getXml() /** * Get the response body as XML decoded data. * - * @return null|\SimpleXMLElement + * @return \SimpleXMLElement|null */ protected function _getXml() { diff --git a/app/vendor/cakephp/cakephp/src/Http/ControllerFactory.php b/app/vendor/cakephp/cakephp/src/Http/ControllerFactory.php index 02b5343a1..6d5b06301 100644 --- a/app/vendor/cakephp/cakephp/src/Http/ControllerFactory.php +++ b/app/vendor/cakephp/cakephp/src/Http/ControllerFactory.php @@ -81,7 +81,8 @@ public function getControllerClass(ServerRequest $request) // Disallow plugin short forms, / and \\ from // controller names as they allow direct references to // be created. - if (strpos($controller, '\\') !== false || + if ( + strpos($controller, '\\') !== false || strpos($controller, '/') !== false || strpos($controller, '.') !== false || $firstChar === strtolower($firstChar) @@ -105,7 +106,7 @@ protected function missingController($request) 'class' => $request->getParam('controller'), 'plugin' => $request->getParam('plugin'), 'prefix' => $request->getParam('prefix'), - '_ext' => $request->getParam('_ext') + '_ext' => $request->getParam('_ext'), ]); } } diff --git a/app/vendor/cakephp/cakephp/src/Http/Cookie/Cookie.php b/app/vendor/cakephp/cakephp/src/Http/Cookie/Cookie.php index 7d6f3bde6..0576de31c 100644 --- a/app/vendor/cakephp/cakephp/src/Http/Cookie/Cookie.php +++ b/app/vendor/cakephp/cakephp/src/Http/Cookie/Cookie.php @@ -42,12 +42,11 @@ * * @link https://tools.ietf.org/html/rfc6265 * @link https://en.wikipedia.org/wiki/HTTP_cookie - * @see Cake\Http\Cookie\CookieCollection for working with collections of cookies. - * @see Cake\Http\Response::getCookieCollection() for working with response cookies. + * @see \Cake\Http\Cookie\CookieCollection for working with collections of cookies. + * @see \Cake\Http\Response::getCookieCollection() for working with response cookies. */ class Cookie implements CookieInterface { - /** * Cookie name * @@ -104,6 +103,13 @@ class Cookie implements CookieInterface */ protected $httpOnly = false; + /** + * Samesite + * + * @var string|null + */ + protected $sameSite = null; + /** * Constructor * @@ -119,6 +125,8 @@ class Cookie implements CookieInterface * @param string $domain Domain * @param bool $secure Is secure * @param bool $httpOnly HTTP Only + * @param string|null $sameSite Samesite + * @throws \InvalidArgumentException If an invalid value is passed for any of the arguments. */ public function __construct( $name, @@ -127,7 +135,8 @@ public function __construct( $path = '/', $domain = '', $secure = false, - $httpOnly = false + $httpOnly = false, + $sameSite = null ) { $this->validateName($name); $this->name = $name; @@ -145,6 +154,12 @@ public function __construct( $this->validateBool($secure); $this->secure = $secure; + + if ($sameSite) { + $this->validateSameSiteValue($sameSite); + $this->sameSite = $sameSite; + } + if ($expiresAt) { $expiresAt = $expiresAt->setTimezone(new DateTimeZone('GMT')); } @@ -170,6 +185,9 @@ public function toHeaderValue() if ($this->path !== '') { $headerValue[] = sprintf('path=%s', $this->path); } + if ($this->sameSite) { + $headerValue[] = sprintf('samesite=%s', $this->sameSite); + } if ($this->domain !== '') { $headerValue[] = sprintf('domain=%s', $this->domain); } @@ -467,6 +485,52 @@ public function withExpired() return $new; } + /** + * Get the SameSite attribute. + * + * @return string|null + */ + public function getSameSite() + { + return $this->sameSite; + } + + /** + * Create a cookie with an updated SameSite option. + * + * @param string|null $sameSite Value for to set for Samesite option. + * One of CookieInterface::SAMESITE_* constants. + * @return static + * @throws \InvalidArgumentException If argument value is not one of CookieInterface::SAMESITE_VALUES + */ + public function withSameSite($sameSite = null) + { + if ($sameSite !== null) { + $this->validateSameSiteValue($sameSite); + } + + $new = clone $this; + $new->sameSite = $sameSite; + + return $new; + } + + /** + * Check that value passed for SameSite is valid. + * + * @param string $sameSite SameSite value + * @return void + * @throws \InvalidArgumentException + */ + protected static function validateSameSiteValue($sameSite) + { + if (!in_array($sameSite, CookieInterface::SAMESITE_VALUES, true)) { + throw new InvalidArgumentException( + 'SameSite value must be either of: ' . implode(', ', CookieInterface::SAMESITE_VALUES) + ); + } + } + /** * Checks if a value exists in the cookie data. * diff --git a/app/vendor/cakephp/cakephp/src/Http/Cookie/CookieCollection.php b/app/vendor/cakephp/cakephp/src/Http/Cookie/CookieCollection.php index 1e91778f8..6a3b575c9 100644 --- a/app/vendor/cakephp/cakephp/src/Http/Cookie/CookieCollection.php +++ b/app/vendor/cakephp/cakephp/src/Http/Cookie/CookieCollection.php @@ -32,7 +32,6 @@ */ class CookieCollection implements IteratorAggregate, Countable { - /** * Cookie objects * @@ -351,7 +350,7 @@ protected static function parseSetCookieHeader($values) 'secure' => false, 'httponly' => false, 'expires' => null, - 'max-age' => null + 'max-age' => null, ]; foreach ($parts as $i => $part) { if (strpos($part, '=') !== false) { diff --git a/app/vendor/cakephp/cakephp/src/Http/Cookie/CookieInterface.php b/app/vendor/cakephp/cakephp/src/Http/Cookie/CookieInterface.php index 3d752812f..3a5b42346 100644 --- a/app/vendor/cakephp/cakephp/src/Http/Cookie/CookieInterface.php +++ b/app/vendor/cakephp/cakephp/src/Http/Cookie/CookieInterface.php @@ -15,10 +15,12 @@ /** * Cookie Interface + * + * @method string|null getSameSite() + * @method static withSameSite($sameSite = null) */ interface CookieInterface { - /** * Expires attribute format. * @@ -26,6 +28,38 @@ interface CookieInterface */ const EXPIRES_FORMAT = 'D, d-M-Y H:i:s T'; + /** + * SameSite attribute value: Lax + * + * @var string + */ + const SAMESITE_LAX = 'Lax'; + + /** + * SameSite attribute value: Strict + * + * @var string + */ + const SAMESITE_STRICT = 'Strict'; + + /** + * SameSite attribute value: None + * + * @var string + */ + const SAMESITE_NONE = 'None'; + + /** + * Valid values for "SameSite" attribute. + * + * @var string[] + */ + const SAMESITE_VALUES = [ + self::SAMESITE_LAX, + self::SAMESITE_STRICT, + self::SAMESITE_NONE, + ]; + /** * Sets the cookie name * diff --git a/app/vendor/cakephp/cakephp/src/Http/CorsBuilder.php b/app/vendor/cakephp/cakephp/src/Http/CorsBuilder.php index cacbd4472..36918c334 100644 --- a/app/vendor/cakephp/cakephp/src/Http/CorsBuilder.php +++ b/app/vendor/cakephp/cakephp/src/Http/CorsBuilder.php @@ -30,7 +30,6 @@ */ class CorsBuilder { - /** * The response object this builder is attached to. * @@ -175,7 +174,7 @@ public function allowCredentials() /** * Whitelist headers that can be sent in CORS requests. * - * @param array $headers The list of headers to accept in CORS requests. + * @param string[] $headers The list of headers to accept in CORS requests. * @return $this */ public function allowHeaders(array $headers) @@ -188,7 +187,7 @@ public function allowHeaders(array $headers) /** * Define the headers a client library/browser can expose to scripting * - * @param array $headers The list of headers to expose CORS responses + * @param string[] $headers The list of headers to expose CORS responses * @return $this */ public function exposeHeaders(array $headers) diff --git a/app/vendor/cakephp/cakephp/src/Http/Exception/BadRequestException.php b/app/vendor/cakephp/cakephp/src/Http/Exception/BadRequestException.php index ea51c0d8e..62ff763cc 100644 --- a/app/vendor/cakephp/cakephp/src/Http/Exception/BadRequestException.php +++ b/app/vendor/cakephp/cakephp/src/Http/Exception/BadRequestException.php @@ -17,7 +17,6 @@ */ class BadRequestException extends HttpException { - /** * {@inheritDoc} */ diff --git a/app/vendor/cakephp/cakephp/src/Http/Exception/ConflictException.php b/app/vendor/cakephp/cakephp/src/Http/Exception/ConflictException.php index ef561ebfd..b169c0c36 100644 --- a/app/vendor/cakephp/cakephp/src/Http/Exception/ConflictException.php +++ b/app/vendor/cakephp/cakephp/src/Http/Exception/ConflictException.php @@ -17,7 +17,6 @@ */ class ConflictException extends HttpException { - /** * {@inheritDoc} */ diff --git a/app/vendor/cakephp/cakephp/src/Http/Exception/ForbiddenException.php b/app/vendor/cakephp/cakephp/src/Http/Exception/ForbiddenException.php index c22043490..b504ffdb2 100644 --- a/app/vendor/cakephp/cakephp/src/Http/Exception/ForbiddenException.php +++ b/app/vendor/cakephp/cakephp/src/Http/Exception/ForbiddenException.php @@ -17,7 +17,6 @@ */ class ForbiddenException extends HttpException { - /** * {@inheritDoc} */ diff --git a/app/vendor/cakephp/cakephp/src/Http/Exception/GoneException.php b/app/vendor/cakephp/cakephp/src/Http/Exception/GoneException.php index 2da289d6f..09d9845bf 100644 --- a/app/vendor/cakephp/cakephp/src/Http/Exception/GoneException.php +++ b/app/vendor/cakephp/cakephp/src/Http/Exception/GoneException.php @@ -17,7 +17,6 @@ */ class GoneException extends HttpException { - /** * {@inheritDoc} */ diff --git a/app/vendor/cakephp/cakephp/src/Http/Exception/InternalErrorException.php b/app/vendor/cakephp/cakephp/src/Http/Exception/InternalErrorException.php index 8d1adb6dd..872fccf72 100644 --- a/app/vendor/cakephp/cakephp/src/Http/Exception/InternalErrorException.php +++ b/app/vendor/cakephp/cakephp/src/Http/Exception/InternalErrorException.php @@ -17,7 +17,6 @@ */ class InternalErrorException extends HttpException { - /** * Constructor * diff --git a/app/vendor/cakephp/cakephp/src/Http/Exception/InvalidCsrfTokenException.php b/app/vendor/cakephp/cakephp/src/Http/Exception/InvalidCsrfTokenException.php index d8bde20eb..fe48b358c 100644 --- a/app/vendor/cakephp/cakephp/src/Http/Exception/InvalidCsrfTokenException.php +++ b/app/vendor/cakephp/cakephp/src/Http/Exception/InvalidCsrfTokenException.php @@ -17,7 +17,6 @@ */ class InvalidCsrfTokenException extends HttpException { - /** * {@inheritDoc} */ diff --git a/app/vendor/cakephp/cakephp/src/Http/Exception/MethodNotAllowedException.php b/app/vendor/cakephp/cakephp/src/Http/Exception/MethodNotAllowedException.php index 887695337..fdae9b051 100644 --- a/app/vendor/cakephp/cakephp/src/Http/Exception/MethodNotAllowedException.php +++ b/app/vendor/cakephp/cakephp/src/Http/Exception/MethodNotAllowedException.php @@ -17,7 +17,6 @@ */ class MethodNotAllowedException extends HttpException { - /** * {@inheritDoc} */ diff --git a/app/vendor/cakephp/cakephp/src/Http/Exception/NotAcceptableException.php b/app/vendor/cakephp/cakephp/src/Http/Exception/NotAcceptableException.php index 879adf5b2..31cecf098 100644 --- a/app/vendor/cakephp/cakephp/src/Http/Exception/NotAcceptableException.php +++ b/app/vendor/cakephp/cakephp/src/Http/Exception/NotAcceptableException.php @@ -17,7 +17,6 @@ */ class NotAcceptableException extends HttpException { - /** * {@inheritDoc} */ diff --git a/app/vendor/cakephp/cakephp/src/Http/Exception/NotFoundException.php b/app/vendor/cakephp/cakephp/src/Http/Exception/NotFoundException.php index 3fb687e35..f7f55a149 100644 --- a/app/vendor/cakephp/cakephp/src/Http/Exception/NotFoundException.php +++ b/app/vendor/cakephp/cakephp/src/Http/Exception/NotFoundException.php @@ -17,7 +17,6 @@ */ class NotFoundException extends HttpException { - /** * {@inheritDoc} */ diff --git a/app/vendor/cakephp/cakephp/src/Http/Exception/NotImplementedException.php b/app/vendor/cakephp/cakephp/src/Http/Exception/NotImplementedException.php index 024285204..9c9332108 100644 --- a/app/vendor/cakephp/cakephp/src/Http/Exception/NotImplementedException.php +++ b/app/vendor/cakephp/cakephp/src/Http/Exception/NotImplementedException.php @@ -17,7 +17,6 @@ */ class NotImplementedException extends HttpException { - /** * {@inheritDoc} */ diff --git a/app/vendor/cakephp/cakephp/src/Http/Exception/ServiceUnavailableException.php b/app/vendor/cakephp/cakephp/src/Http/Exception/ServiceUnavailableException.php index 7e9614ca2..fd16851e4 100644 --- a/app/vendor/cakephp/cakephp/src/Http/Exception/ServiceUnavailableException.php +++ b/app/vendor/cakephp/cakephp/src/Http/Exception/ServiceUnavailableException.php @@ -17,7 +17,6 @@ */ class ServiceUnavailableException extends HttpException { - /** * {@inheritDoc} */ diff --git a/app/vendor/cakephp/cakephp/src/Http/Exception/UnauthorizedException.php b/app/vendor/cakephp/cakephp/src/Http/Exception/UnauthorizedException.php index 77ee425d5..421b89824 100644 --- a/app/vendor/cakephp/cakephp/src/Http/Exception/UnauthorizedException.php +++ b/app/vendor/cakephp/cakephp/src/Http/Exception/UnauthorizedException.php @@ -17,7 +17,6 @@ */ class UnauthorizedException extends HttpException { - /** * {@inheritDoc} */ diff --git a/app/vendor/cakephp/cakephp/src/Http/Exception/UnavailableForLegalReasonsException.php b/app/vendor/cakephp/cakephp/src/Http/Exception/UnavailableForLegalReasonsException.php index e99f3443e..5fa34beb9 100644 --- a/app/vendor/cakephp/cakephp/src/Http/Exception/UnavailableForLegalReasonsException.php +++ b/app/vendor/cakephp/cakephp/src/Http/Exception/UnavailableForLegalReasonsException.php @@ -17,7 +17,6 @@ */ class UnavailableForLegalReasonsException extends HttpException { - /** * {@inheritDoc} */ diff --git a/app/vendor/cakephp/cakephp/src/Http/Middleware/CspMiddleware.php b/app/vendor/cakephp/cakephp/src/Http/Middleware/CspMiddleware.php new file mode 100644 index 000000000..ab528e9de --- /dev/null +++ b/app/vendor/cakephp/cakephp/src/Http/Middleware/CspMiddleware.php @@ -0,0 +1,72 @@ +csp = $csp; + } + + /** + * Apply the middleware. + * + * This will inject the CSP header into the response. + * + * @param ServerRequestInterface $requestInterface The Request. + * @param ResponseInterface $responseInterface The Response. + * @param callable $next Callback to invoke the next middleware. + * @return \Psr\Http\Message\MessageInterface + */ + public function __invoke(ServerRequestInterface $requestInterface, ResponseInterface $responseInterface, callable $next) + { + $response = $this->csp->injectCSPHeader($responseInterface); + + return $next($requestInterface, $response, $next); + } +} diff --git a/app/vendor/cakephp/cakephp/src/Http/Middleware/CsrfProtectionMiddleware.php b/app/vendor/cakephp/cakephp/src/Http/Middleware/CsrfProtectionMiddleware.php index 4b11e35c6..5c6b410a7 100644 --- a/app/vendor/cakephp/cakephp/src/Http/Middleware/CsrfProtectionMiddleware.php +++ b/app/vendor/cakephp/cakephp/src/Http/Middleware/CsrfProtectionMiddleware.php @@ -46,6 +46,7 @@ class CsrfProtectionMiddleware * Defaults to browser session. * - `secure` Whether or not the cookie will be set with the Secure flag. Defaults to false. * - `httpOnly` Whether or not the cookie will be set with the HttpOnly flag. Defaults to false. + * - `samesite` Value for "SameSite" attribute. Default to null. * - `field` The form field to check. Changing this will also require configuring * FormHelper. * @@ -56,6 +57,7 @@ class CsrfProtectionMiddleware 'expiry' => 0, 'secure' => false, 'httpOnly' => false, + 'samesite' => null, 'field' => '_csrfToken', ]; @@ -95,7 +97,8 @@ public function __construct(array $config = []) */ public function __invoke(ServerRequest $request, Response $response, $next) { - if ($this->whitelistCallback !== null + if ( + $this->whitelistCallback !== null && call_user_func($this->whitelistCallback, $request) === true ) { return $next($request, $response); @@ -104,7 +107,7 @@ public function __invoke(ServerRequest $request, Response $response, $next) $cookies = $request->getCookieParams(); $cookieData = Hash::get($cookies, $this->_config['cookieName']); - if (strlen($cookieData) > 0) { + if (is_string($cookieData) && strlen($cookieData) > 0) { $params = $request->getAttribute('params'); $params['_csrfToken'] = $cookieData; $request = $request->withAttribute('params', $params); @@ -203,7 +206,8 @@ protected function _addTokenCookie($token, ServerRequest $request, Response $res $request->getAttribute('webroot'), '', (bool)$this->_config['secure'], - (bool)$this->_config['httpOnly'] + (bool)$this->_config['httpOnly'], + isset($this->_config['samesite']) ? $this->_config['samesite'] : $this->_defaultConfig['samesite'] ); return $response->withCookie($cookie); diff --git a/app/vendor/cakephp/cakephp/src/Http/Middleware/EncryptedCookieMiddleware.php b/app/vendor/cakephp/cakephp/src/Http/Middleware/EncryptedCookieMiddleware.php index dbb4d3f51..991182972 100644 --- a/app/vendor/cakephp/cakephp/src/Http/Middleware/EncryptedCookieMiddleware.php +++ b/app/vendor/cakephp/cakephp/src/Http/Middleware/EncryptedCookieMiddleware.php @@ -40,6 +40,7 @@ class EncryptedCookieMiddleware /** * The list of cookies to encrypt/decrypt + * * @var array */ protected $cookieNames; diff --git a/app/vendor/cakephp/cakephp/src/Http/Middleware/SecurityHeadersMiddleware.php b/app/vendor/cakephp/cakephp/src/Http/Middleware/SecurityHeadersMiddleware.php index c86ee6484..82eeb4dd9 100644 --- a/app/vendor/cakephp/cakephp/src/Http/Middleware/SecurityHeadersMiddleware.php +++ b/app/vendor/cakephp/cakephp/src/Http/Middleware/SecurityHeadersMiddleware.php @@ -21,7 +21,7 @@ /** * Handles common security headers in a convenient way * - * @link https://book.cakephp.org/3.0/en/controllers/middleware.html#security-header-middleware + * @link https://book.cakephp.org/3/en/controllers/middleware.html#security-header-middleware */ class SecurityHeadersMiddleware { diff --git a/app/vendor/cakephp/cakephp/src/Http/MiddlewareQueue.php b/app/vendor/cakephp/cakephp/src/Http/MiddlewareQueue.php index 7f12d3bb1..7e05983c1 100644 --- a/app/vendor/cakephp/cakephp/src/Http/MiddlewareQueue.php +++ b/app/vendor/cakephp/cakephp/src/Http/MiddlewareQueue.php @@ -87,7 +87,7 @@ protected function resolve($index) $class )); } - $callable = new $className; + $callable = new $className(); } else { $callable = $this->queue[$index]; } @@ -174,9 +174,10 @@ public function insertAt($index, $middleware) public function insertBefore($class, $middleware) { $found = false; - $i = null; + $i = 0; foreach ($this->queue as $i => $object) { - if ((is_string($object) && $object === $class) + if ( + (is_string($object) && $object === $class) || is_a($object, $class) ) { $found = true; @@ -203,9 +204,10 @@ public function insertBefore($class, $middleware) public function insertAfter($class, $middleware) { $found = false; - $i = null; + $i = 0; foreach ($this->queue as $i => $object) { - if ((is_string($object) && $object === $class) + if ( + (is_string($object) && $object === $class) || is_a($object, $class) ) { $found = true; diff --git a/app/vendor/cakephp/cakephp/src/Http/RequestTransformer.php b/app/vendor/cakephp/cakephp/src/Http/RequestTransformer.php index df89d29a2..cd1f59180 100644 --- a/app/vendor/cakephp/cakephp/src/Http/RequestTransformer.php +++ b/app/vendor/cakephp/cakephp/src/Http/RequestTransformer.php @@ -83,7 +83,7 @@ protected static function getParams(PsrRequest $request) 'controller' => null, 'action' => null, '_ext' => null, - 'pass' => [] + 'pass' => [], ]; return $params; diff --git a/app/vendor/cakephp/cakephp/src/Http/Response.php b/app/vendor/cakephp/cakephp/src/Http/Response.php index 16b97bd8e..7fb615a37 100644 --- a/app/vendor/cakephp/cakephp/src/Http/Response.php +++ b/app/vendor/cakephp/cakephp/src/Http/Response.php @@ -27,21 +27,36 @@ use DateTimeInterface; use DateTimeZone; use InvalidArgumentException; +use Laminas\Diactoros\MessageTrait; +use Laminas\Diactoros\Stream; use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\StreamInterface; -use Zend\Diactoros\MessageTrait; -use Zend\Diactoros\Stream; /** * Responses contain the response text, status and headers of a HTTP response. + * + * There are external packages such as `fig/http-message-util` that provide HTTP + * status code constants. These can be used with any method that accepts or + * returns a status code integer. Keep in mind that these consants might + * include status codes that are now allowed which will throw an + * `\InvalidArgumentException`. */ class Response implements ResponseInterface { - use MessageTrait; /** - * Holds HTTP response statuses + * @var int + */ + const STATUS_CODE_MIN = 100; + + /** + * @var int + */ + const STATUS_CODE_MAX = 599; + + /** + * Allowed HTTP status codes and their default description. * * @var string[] */ @@ -340,7 +355,7 @@ class Response implements ResponseInterface 'mkv' => 'video/x-matroska', 'pkpass' => 'application/vnd.apple.pkpass', 'ajax' => 'text/html', - 'bmp' => 'image/bmp' + 'bmp' => 'image/bmp', ]; /** @@ -357,14 +372,6 @@ class Response implements ResponseInterface */ protected $_status = 200; - /** - * Content type to send. This can be an 'extension' that will be transformed using the $_mimetypes array - * or a complete mime-type - * - * @var string - */ - protected $_contentType = 'text/html'; - /** * File object for file to be read out as response * @@ -462,10 +469,11 @@ public function __construct(array $options = []) $options['charset'] = Configure::read('App.encoding'); } $this->_charset = $options['charset']; + $type = 'text/html'; if (isset($options['type'])) { - $this->_contentType = $this->resolveType($options['type']); + $type = $this->resolveType($options['type']); } - $this->_setContentType(); + $this->_setContentType($type); $this->_cookies = new CookieCollection(); } @@ -484,7 +492,7 @@ protected function _createStream() * Will echo out the content in the response body. * * @return void - * @deprecated 3.4.0 Will be removed in 4.0.0 + * @deprecated 3.4.0 Will be removed in 4.0.0. Use Cake\Http\ResponseEmitter if required */ public function send() { @@ -502,7 +510,7 @@ public function send() $this->_file = null; $this->_fileRange = []; } else { - $this->_sendContent($this->body()); + $this->_sendContent($this->getBody()); } if (function_exists('fastcgi_finish_request')) { @@ -532,7 +540,6 @@ public function sendHeaders() $codeMessage = $this->_statusCodes[$this->_status]; $this->_setCookies(); $this->_sendHeader("{$this->_protocol} {$this->_status} {$codeMessage}"); - $this->_setContentType(); foreach ($this->headers as $header => $values) { foreach ((array)$values as $value) { @@ -572,9 +579,10 @@ protected function _setCookies() * Formats the Content-Type header based on the configured contentType and charset * the charset will only be set in the header if the response is of type text/* * + * @param string $type The type to set. * @return void */ - protected function _setContentType() + protected function _setContentType($type) { if (in_array($this->_status, [304, 204])) { $this->_clearHeader('Content-Type'); @@ -582,20 +590,24 @@ protected function _setContentType() return; } $whitelist = [ - 'application/javascript', 'application/xml', 'application/rss+xml' + 'application/javascript', 'application/xml', 'application/rss+xml', ]; $charset = false; - if ($this->_charset && - (strpos($this->_contentType, 'text/') === 0 || in_array($this->_contentType, $whitelist)) + if ( + $this->_charset && + ( + strpos($type, 'text/') === 0 || + in_array($type, $whitelist, true) + ) ) { $charset = true; } - if ($charset) { - $this->_setHeader('Content-Type', "{$this->_contentType}; charset={$this->_charset}"); + if ($charset && strpos($type, ';') === false) { + $this->_setHeader('Content-Type', "{$type}; charset={$this->_charset}"); } else { - $this->_setHeader('Content-Type', (string)$this->_contentType); + $this->_setHeader('Content-Type', $type); } } @@ -763,7 +775,7 @@ protected function getSimpleHeaders() * * Get/Set the Location header value. * - * @param null|string $url Either null to get the current location, or a string to set one. + * @param string|null $url Either null to get the current location, or a string to set one. * @return string|null When setting the location null will be returned. When reading the location * a string of the current location header value (if any) will be returned. * @deprecated 3.4.0 Mutable responses are deprecated. Use `withLocation()` and `getHeaderLine()` @@ -900,8 +912,8 @@ protected function _handleCallableBody(callable $content) } /** - * Sets the HTTP status code to be sent - * if $code is null the current code is returned + * Sets the HTTP status code to be sent. + * If $code is null the current code is returned * * If the status code is 304 or 204, the existing Content-Type header * will be cleared, as these response codes have no body. @@ -956,9 +968,15 @@ public function getStatusCode() * If the status code is 304 or 204, the existing Content-Type header * will be cleared, as these response codes have no body. * + * There are external packages such as `fig/http-message-util` that provide HTTP + * status code constants. These can be used with any method that accepts or + * returns a status code integer. However, keep in mind that these consants + * might include status codes that are now allowed which will throw an + * `\InvalidArgumentException`. + * * @link https://tools.ietf.org/html/rfc7231#section-6 * @link https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml - * @param int $code The 3-digit integer result code to set. + * @param int $code The 3-digit integer status code to set. * @param string $reasonPhrase The reason phrase to use with the * provided status code; if none is provided, implementations MAY * use the defaults as suggested in the HTTP specification. @@ -976,14 +994,14 @@ public function withStatus($code, $reasonPhrase = '') /** * Modifier for response status * - * @param int $code The code to set. + * @param int $code The status code to set. * @param string $reasonPhrase The response reason phrase. * @return void * @throws \InvalidArgumentException For invalid status code arguments. */ protected function _setStatus($code, $reasonPhrase = '') { - if (!isset($this->_statusCodes[$code])) { + if ($code < static::STATUS_CODE_MIN || $code > static::STATUS_CODE_MAX) { throw new InvalidArgumentException(sprintf( 'Invalid status code: %s. Use a valid HTTP status code in range 1xx - 5xx.', $code @@ -991,11 +1009,15 @@ protected function _setStatus($code, $reasonPhrase = '') } $this->_status = $code; - if (empty($reasonPhrase)) { + if ($reasonPhrase === '' && isset($this->_statusCodes[$code])) { $reasonPhrase = $this->_statusCodes[$code]; } $this->_reasonPhrase = $reasonPhrase; - $this->_setContentType(); + + // These status codes don't have bodies and can't have content-types. + if (in_array($code, [304, 204], true)) { + $this->_clearHeader('Content-Type'); + } } /** @@ -1042,7 +1064,6 @@ public function getReasonPhrase() * ]); // throws an exception due to invalid codes * * For more on HTTP status codes see: http://www.w3.org/Protocols/rfc2616/rfc2616-sec6.html#sec6.1 - * * @return mixed Associative array of the HTTP codes as keys, and the message * strings as values, or null of the given $code does not exist. * @throws \InvalidArgumentException If an attempt is made to add an invalid status code @@ -1133,8 +1154,7 @@ public function type($contentType = null) if (strpos($contentType, '/') === false) { return false; } - $this->_contentType = $contentType; - $this->_setContentType(); + $this->_setContentType($contentType); return $contentType; } @@ -1162,7 +1182,12 @@ public function setTypeMap($type, $mimeType) */ public function getType() { - return $this->_contentType; + $header = $this->getHeaderLine('Content-Type'); + if (strpos($header, ';') !== false) { + return explode(';', $header)[0]; + } + + return $header; } /** @@ -1178,8 +1203,7 @@ public function withType($contentType) { $mappedType = $this->resolveType($contentType); $new = clone $this; - $new->_contentType = $mappedType; - $new->_setContentType(); + $new->_setContentType($mappedType); return $new; } @@ -1263,7 +1287,7 @@ public function charset($charset = null) return $this->_charset; } $this->_charset = $charset; - $this->_setContentType(); + $this->_setContentType($this->getType()); return $this->_charset; } @@ -1288,7 +1312,7 @@ public function withCharset($charset) { $new = clone $this; $new->_charset = $charset; - $new->_setContentType(); + $new->_setContentType($this->getType()); return $new; } @@ -1346,7 +1370,7 @@ public function cache($since, $time = '+1 day') } } - $this->_setHeader('Date', gmdate('D, j M Y G:i:s ', time()) . 'GMT'); + $this->_setHeader('Date', gmdate('D, d M Y H:i:s ', time()) . 'GMT'); $this->modified($since); $this->expires($time); @@ -1371,7 +1395,7 @@ public function withCache($since, $time = '+1 day') } } - return $this->withHeader('Date', gmdate('D, j M Y G:i:s ', time()) . 'GMT') + return $this->withHeader('Date', gmdate('D, d M Y H:i:s ', time()) . 'GMT') ->withModified($since) ->withExpires($time) ->withSharable(true) @@ -1741,7 +1765,7 @@ public function notModified() 'Content-Length', 'Content-MD5', 'Content-Type', - 'Last-Modified' + 'Last-Modified', ]; foreach ($remove as $header) { $this->_clearHeader($header); @@ -1768,7 +1792,7 @@ public function withNotModified() 'Content-Length', 'Content-MD5', 'Content-Type', - 'Last-Modified' + 'Last-Modified', ]; foreach ($remove as $header) { $new = $new->withoutHeader($header); @@ -2183,7 +2207,7 @@ public function cookie($options = null) 'path' => '/', 'domain' => '', 'secure' => false, - 'httpOnly' => false + 'httpOnly' => false, ]; $expires = $options['expire'] ? new DateTime('@' . $options['expire']) : null; $cookie = new Cookie( @@ -2246,7 +2270,8 @@ public function withCookie($name, $data = '') 'path' => '/', 'domain' => '', 'secure' => false, - 'httpOnly' => false + 'httpOnly' => false, + 'samesite' => null, ]; $expires = $data['expire'] ? new DateTime('@' . $data['expire']) : null; $cookie = new Cookie( @@ -2256,7 +2281,8 @@ public function withCookie($name, $data = '') $data['path'], $data['domain'], $data['secure'], - $data['httpOnly'] + $data['httpOnly'], + $data['samesite'] ); } @@ -2307,7 +2333,7 @@ public function withExpiredCookie($name, $options = []) 'path' => '/', 'domain' => '', 'secure' => false, - 'httpOnly' => false + 'httpOnly' => false, ]; $cookie = new Cookie( @@ -2382,7 +2408,8 @@ protected function convertCookieToArray(CookieInterface $cookie) 'domain' => $cookie->getDomain(), 'secure' => $cookie->isSecure(), 'httpOnly' => $cookie->isHttpOnly(), - 'expire' => $cookie->getExpiresTimestamp() + 'expire' => $cookie->getExpiresTimestamp(), + 'samesite' => $cookie->getSameSite(), ]; } @@ -2444,9 +2471,9 @@ public function withCookieCollection(CookieCollection $cookieCollection) * Instead the builder object should be used. * * @param \Cake\Http\ServerRequest $request Request object - * @param string|array $allowedDomains List of allowed domains, see method description for more details - * @param string|array $allowedMethods List of HTTP verbs allowed - * @param string|array $allowedHeaders List of HTTP headers allowed + * @param string|string[] $allowedDomains List of allowed domains, see method description for more details + * @param string|string[] $allowedMethods List of HTTP verbs allowed + * @param string|string[] $allowedHeaders List of HTTP headers allowed * @return \Cake\Http\CorsBuilder A builder object the provides a fluent interface for defining * additional CORS headers. */ @@ -2512,7 +2539,7 @@ public function file($path, array $options = []) $file = $this->validateFile($path); $options += [ 'name' => null, - 'download' => null + 'download' => null, ]; $extension = strtolower($file->ext()); @@ -2580,7 +2607,7 @@ public function withFile($path, array $options = []) $file = $this->validateFile($path); $options += [ 'name' => null, - 'download' => null + 'download' => null, ]; $extension = strtolower($file->ext()); @@ -2857,7 +2884,7 @@ public function __debugInfo() { return [ 'status' => $this->_status, - 'contentType' => $this->_contentType, + 'contentType' => $this->getType(), 'headers' => $this->headers, 'file' => $this->_file, 'fileRange' => $this->_fileRange, diff --git a/app/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php b/app/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php index 72b60d082..81ab6d2e7 100644 --- a/app/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php +++ b/app/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php @@ -13,7 +13,6 @@ * @license https://opensource.org/licenses/mit-license.php MIT License * * Parts of this file are derived from Zend-Diactoros - * * @copyright Copyright (c) 2015-2016 Zend Technologies USA Inc. (https://www.zend.com/) * @license https://github.com/zendframework/zend-diactoros/blob/master/LICENSE.md New BSD License */ @@ -21,9 +20,9 @@ use Cake\Core\Configure; use Cake\Log\Log; +use Laminas\Diactoros\RelativeStream; +use Laminas\Diactoros\Response\EmitterInterface; use Psr\Http\Message\ResponseInterface; -use Zend\Diactoros\RelativeStream; -use Zend\Diactoros\Response\EmitterInterface; /** * Emits a Response to the PHP Server API. @@ -41,6 +40,9 @@ class ResponseEmitter implements EmitterInterface { /** * {@inheritDoc} + * + * @param \Psr\Http\Message\ResponseInterface $response Response + * @param int $maxBufferLength Max buffer length */ public function emit(ResponseInterface $response, $maxBufferLength = 8192) { @@ -200,14 +202,15 @@ protected function emitCookies(array $cookies) { foreach ($cookies as $cookie) { if (is_array($cookie)) { - setcookie( + $options = $cookie; + $options['httponly'] = $options['httpOnly']; + $options['expires'] = $options['expire']; + unset($options['name'], $options['value'], $options['httpOnly'], $options['expire']); + + $this->setcookie( $cookie['name'], $cookie['value'], - $cookie['expire'], - $cookie['path'], - $cookie['domain'], - $cookie['secure'], - $cookie['httpOnly'] + $options ); continue; } @@ -220,40 +223,70 @@ protected function emitCookies(array $cookies) } list($name, $value) = explode('=', array_shift($parts), 2); + $name = urldecode($name); + $value = urldecode($value); $data = [ - 'name' => urldecode($name), - 'value' => urldecode($value), 'expires' => 0, 'path' => '', 'domain' => '', 'secure' => false, - 'httponly' => false + 'httponly' => false, + 'samesite' => null, ]; foreach ($parts as $part) { if (strpos($part, '=') !== false) { - list($key, $value) = explode('=', $part); + list($key, $val) = explode('=', $part); } else { $key = $part; - $value = true; + $val = true; } $key = strtolower($key); - $data[$key] = $value; + $data[$key] = $val; } - if (!empty($data['expires'])) { + if (is_string($data['expires'])) { $data['expires'] = strtotime($data['expires']); } + unset($data['']); + + $this->setcookie($name, $value, $data); + } + } + + /** + * Set cookies uses setcookie() + * + * @param string $name Cookie name. + * @param string $value Cookie value. + * @param array $options Cookie options. + * @return void + */ + protected function setcookie($name, $value, array $options) + { + if (PHP_VERSION_ID >= 70300) { setcookie( - $data['name'], - $data['value'], - $data['expires'], - $data['path'], - $data['domain'], - $data['secure'], - $data['httponly'] + $name, + $value, + $options ); + + return; + } + + if (!empty($options['samesite'])) { + $options['path'] .= '; SameSite=' . $options['samesite']; } + + setcookie( + $name, + $value, + $options['expires'], + $options['path'], + $options['domain'], + $options['secure'], + $options['httponly'] + ); } /** @@ -279,7 +312,7 @@ protected function flush($maxBufferLevel = null) * https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.16 * * @param string $header The Content-Range header to parse. - * @return false|array [unit, first, last, length]; returns false if no + * @return array|false [unit, first, last, length]; returns false if no * content range or an invalid content range is provided */ protected function parseContentRange($header) diff --git a/app/vendor/cakephp/cakephp/src/Http/ResponseTransformer.php b/app/vendor/cakephp/cakephp/src/Http/ResponseTransformer.php index 58363baae..3bdac5113 100644 --- a/app/vendor/cakephp/cakephp/src/Http/ResponseTransformer.php +++ b/app/vendor/cakephp/cakephp/src/Http/ResponseTransformer.php @@ -188,7 +188,7 @@ protected static function setContentType($headers, $response) } $whitelist = [ - 'application/javascript', 'application/json', 'application/xml', 'application/rss+xml' + 'application/javascript', 'application/json', 'application/xml', 'application/rss+xml', ]; $type = $response->type(); @@ -219,7 +219,7 @@ protected static function buildCookieHeader($cookies) $headers = []; foreach ($cookies as $cookie) { $parts = [ - sprintf('%s=%s', urlencode($cookie['name']), urlencode($cookie['value'])) + sprintf('%s=%s', urlencode($cookie['name']), urlencode($cookie['value'])), ]; if ($cookie['expire']) { $cookie['expire'] = gmdate('D, d M Y H:i:s T', $cookie['expire']); diff --git a/app/vendor/cakephp/cakephp/src/Http/Server.php b/app/vendor/cakephp/cakephp/src/Http/Server.php index 874d6ec70..ac286f3de 100644 --- a/app/vendor/cakephp/cakephp/src/Http/Server.php +++ b/app/vendor/cakephp/cakephp/src/Http/Server.php @@ -20,17 +20,16 @@ use Cake\Event\EventDispatcherTrait; use Cake\Event\EventManager; use InvalidArgumentException; +use Laminas\Diactoros\Response\EmitterInterface; use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface; use RuntimeException; -use Zend\Diactoros\Response\EmitterInterface; /** * Runs an application invoking all the PSR7 middleware and the registered application. */ class Server implements EventDispatcherInterface { - /** * Alias methods away so we can implement proxying methods. */ @@ -129,7 +128,7 @@ protected function bootstrap() * Emit the response using the PHP SAPI. * * @param \Psr\Http\Message\ResponseInterface $response The response to emit - * @param \Zend\Diactoros\Response\EmitterInterface|null $emitter The emitter to use. + * @param \Laminas\Diactoros\Response\EmitterInterface|null $emitter The emitter to use. * When null, a SAPI Stream Emitter will be used. * @return void */ diff --git a/app/vendor/cakephp/cakephp/src/Http/ServerRequest.php b/app/vendor/cakephp/cakephp/src/Http/ServerRequest.php index a67191b30..87014b205 100644 --- a/app/vendor/cakephp/cakephp/src/Http/ServerRequest.php +++ b/app/vendor/cakephp/cakephp/src/Http/ServerRequest.php @@ -22,13 +22,13 @@ use Cake\Http\Session; use Cake\Utility\Hash; use InvalidArgumentException; +use Laminas\Diactoros\PhpInputStream; +use Laminas\Diactoros\Stream; +use Laminas\Diactoros\UploadedFile; use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Message\StreamInterface; use Psr\Http\Message\UploadedFileInterface; use Psr\Http\Message\UriInterface; -use Zend\Diactoros\PhpInputStream; -use Zend\Diactoros\Stream; -use Zend\Diactoros\UploadedFile; /** * A class that helps wrap Request information and particulars about a single request. @@ -36,7 +36,6 @@ */ class ServerRequest implements ArrayAccess, ServerRequestInterface { - /** * Array of parameters parsed from the URL. * @@ -48,7 +47,7 @@ class ServerRequest implements ArrayAccess, ServerRequestInterface 'controller' => null, 'action' => null, '_ext' => null, - 'pass' => [] + 'pass' => [], ]; /** @@ -56,7 +55,7 @@ class ServerRequest implements ArrayAccess, ServerRequestInterface * In PUT/PATCH/DELETE requests this property will contain the form-urlencoded * data. * - * @var null|array|object + * @var array|object|null * @deprecated 3.4.0 This public property will be removed in 4.0.0. Use getData() instead. */ protected $data = []; @@ -243,6 +242,13 @@ class ServerRequest implements ArrayAccess, ServerRequestInterface 'here' => ['get' => 'getAttribute("here")', 'set' => 'withAttribute("here")'], ]; + /** + * Whether to merge file uploads as objects (`true`) or arrays (`false`). + * + * @var bool + */ + private $mergeFilesAsObjects = false; + /** * Wrapper method to create a new request from PHP superglobals. * @@ -281,6 +287,7 @@ public static function createFromGlobals() * - `input` The data that would come from php://input this is useful for simulating * requests with put, patch or delete data. * - `session` An instance of a Session object + * - `mergeFilesAsObjects` Whether to merge file uploads as objects (`true`) or arrays (`false`). * * @param string|array $config An array of request data to create a request with. * The string version of this argument is *deprecated* and will be removed in 4.0.0 @@ -302,6 +309,7 @@ public function __construct($config = []) 'base' => '', 'webroot' => '', 'input' => null, + 'mergeFilesAsObjects' => false, ]; $this->_setConfig($config); @@ -321,7 +329,7 @@ protected function _setConfig($config) if (empty($config['session'])) { $config['session'] = new Session([ - 'cookiePath' => $config['base'] + 'cookiePath' => $config['base'], ]); } @@ -364,6 +372,8 @@ protected function _setConfig($config) } $this->stream = $stream; + $this->mergeFilesAsObjects = $config['mergeFilesAsObjects']; + $config['post'] = $this->_processPost($config['post']); $this->data = $this->_processFiles($config['post'], $config['files']); $this->query = $this->_processGet($config['query'], $querystr); @@ -384,7 +394,8 @@ protected function _processPost($data) $method = $this->getEnv('REQUEST_METHOD'); $override = false; - if (in_array($method, ['PUT', 'DELETE', 'PATCH']) && + if ( + in_array($method, ['PUT', 'DELETE', 'PATCH'], true) && strpos($this->contentType(), 'application/x-www-form-urlencoded') === 0 ) { $data = $this->input(); @@ -401,7 +412,7 @@ protected function _processPost($data) $override = true; } - if ($override && !in_array($this->_environment['REQUEST_METHOD'], ['PUT', 'POST', 'DELETE', 'PATCH'])) { + if ($override && !in_array($this->_environment['REQUEST_METHOD'], ['PUT', 'POST', 'DELETE', 'PATCH'], true)) { $data = []; } @@ -436,7 +447,10 @@ protected function _processGet($query, $queryString = '') */ protected function _processFiles($post, $files) { - if (!is_array($files)) { + if ( + empty($files) || + !is_array($files) + ) { return $post; } $fileData = []; @@ -458,6 +472,10 @@ protected function _processFiles($post, $files) } $this->uploadedFiles = $fileData; + if ($this->mergeFilesAsObjects) { + return Hash::merge($post, $fileData); + } + // Make a flat map that can be inserted into $post for BC. $fileMap = Hash::flatten($fileData); foreach ($fileMap as $key => $file) { @@ -689,7 +707,6 @@ public function __call($name, $params) /** * Magic set method allows backward compatibility for former public properties * - * * @param string $name The property being accessed. * @param mixed $value The property value. * @return mixed Either the value of the parameter or null. @@ -782,17 +799,21 @@ public function __isset($name) * defined with Cake\Http\ServerRequest::addDetector(). Any detector can be called * as `is($type)` or `is$Type()`. * - * @param string|array $type The type of request you want to check. If an array + * @param string|string[] $type The type of request you want to check. If an array * this method will return true if the request matches any type. - * @param array ...$args List of arguments + * @param mixed ...$args List of arguments * @return bool Whether or not the request is the type you are checking. */ public function is($type, ...$args) { if (is_array($type)) { - $result = array_map([$this, 'is'], $type); + foreach ($type as $_type) { + if ($this->is($_type)) { + return true; + } + } - return count(array_filter($result)) > 0; + return false; } $type = strtolower($type); @@ -949,9 +970,13 @@ protected function _environmentDetector($detect) */ public function isAll(array $types) { - $result = array_filter(array_map([$this, 'is'], $types)); + foreach ($types as $type) { + if (!$this->is($type)) { + return false; + } + } - return count($result) === count($types); + return true; } /** @@ -1120,7 +1145,7 @@ public function here($base = true) protected function normalizeHeaderName($name) { $name = str_replace('-', '_', strtoupper($name)); - if (!in_array($name, ['CONTENT_LENGTH', 'CONTENT_TYPE'])) { + if (!in_array($name, ['CONTENT_LENGTH', 'CONTENT_TYPE'], true)) { $name = 'HTTP_' . $name; } @@ -1336,7 +1361,8 @@ public function withMethod($method) { $new = clone $this; - if (!is_string($method) || + if ( + !is_string($method) || !preg_match('/^[!#$%&\'*+.^_`\|~0-9a-z-]+$/i', $method) ) { throw new InvalidArgumentException(sprintf( @@ -1497,7 +1523,7 @@ public function accepts($type = null) return $accept; } - return in_array($type, $accept); + return in_array($type, $accept, true); } /** @@ -1545,7 +1571,7 @@ public function acceptLanguage($language = null) return $accept; } - return in_array(strtolower($language), $accept); + return in_array(strtolower($language), $accept, true); } /** @@ -1625,7 +1651,7 @@ public function query($name = null) * * @param string|null $name The name or dotted path to the query param or null to read all. * @param mixed $default The default value if the named parameter is not set, and $name is not null. - * @return null|string|array Query data. + * @return array|string|null Query data. * @see ServerRequest::getQueryParams() */ public function getQuery($name = null, $default = null) @@ -1703,7 +1729,7 @@ public function data($name = null, ...$args) * * @param string|null $name Dot separated name of the value to read. Or null to read all data. * @param mixed $default The default data. - * @return null|string|array The value being read. + * @return array|string|null The value being read. */ public function getData($name = null, $default = null) { @@ -1783,7 +1809,7 @@ public function input($callback = null, ...$args) * Read cookie data from the request's cookie data. * * @param string $key The key you want to read. - * @return null|string Either the cookie value, or null if the value doesn't exist. + * @return string|null Either the cookie value, or null if the value doesn't exist. * @deprecated 3.4.0 Use getCookie() instead. */ public function cookie($key) @@ -1805,7 +1831,7 @@ public function cookie($key) * * @param string $key The key or dotted path you want to read. * @param string $default The default value if the cookie is not set. - * @return null|array|string Either the cookie value, or null if the value doesn't exist. + * @return string|array|null Either the cookie value, or null if the value doesn't exist. */ public function getCookie($key, $default = null) { @@ -1883,7 +1909,7 @@ public function withCookieParams(array $cookies) * post data. For other content types, it may be the deserialized request * body. * - * @return null|array|object The deserialized body parameters, if any. + * @return object|array|null The deserialized body parameters, if any. * These will typically be an array or object. */ public function getParsedBody() @@ -1894,7 +1920,7 @@ public function getParsedBody() /** * Update the parsed body and get a new instance. * - * @param null|array|object $data The deserialized body data. This will + * @param object|array|null $data The deserialized body data. This will * typically be in an array or object. * @return static */ @@ -2228,7 +2254,7 @@ public function getAttributes() 'params' => $this->params, 'webroot' => $this->webroot, 'base' => $this->base, - 'here' => $this->here + 'here' => $this->here, ]; return $this->attributes + $emulated; @@ -2238,7 +2264,7 @@ public function getAttributes() * Get the uploaded file from a dotted path. * * @param string $path The dot separated path to the file you want. - * @return null|\Psr\Http\Message\UploadedFileInterface + * @return \Psr\Http\Message\UploadedFileInterface|null */ public function getUploadedFile($path) { diff --git a/app/vendor/cakephp/cakephp/src/Http/ServerRequestFactory.php b/app/vendor/cakephp/cakephp/src/Http/ServerRequestFactory.php index daaf20f51..707322872 100644 --- a/app/vendor/cakephp/cakephp/src/Http/ServerRequestFactory.php +++ b/app/vendor/cakephp/cakephp/src/Http/ServerRequestFactory.php @@ -16,7 +16,7 @@ use Cake\Core\Configure; use Cake\Utility\Hash; -use Zend\Diactoros\ServerRequestFactory as BaseFactory; +use Laminas\Diactoros\ServerRequestFactory as BaseFactory; /** * Factory for making ServerRequest instances. @@ -41,7 +41,7 @@ public static function fromGlobals( $uri = static::createUri($server); $sessionConfig = (array)Configure::read('Session') + [ 'defaults' => 'php', - 'cookiePath' => $uri->webroot + 'cookiePath' => $uri->webroot, ]; $session = Session::create($sessionConfig); $request = new ServerRequest([ @@ -54,6 +54,7 @@ public static function fromGlobals( 'webroot' => $uri->webroot, 'base' => $uri->base, 'session' => $session, + 'mergeFilesAsObjects' => Configure::read('App.uploadedFilesAsObjects', false), ]); return $request; @@ -132,7 +133,8 @@ protected static function updatePath($base, $uri) } $endsWithIndex = '/' . (Configure::read('App.webroot') ?: 'webroot') . '/index.php'; $endsWithLength = strlen($endsWithIndex); - if (strlen($path) >= $endsWithLength && + if ( + strlen($path) >= $endsWithLength && substr($path, -$endsWithLength) === $endsWithIndex ) { $path = '/'; @@ -153,7 +155,7 @@ protected static function getBase($uri, $server) $config = (array)Configure::read('App') + [ 'base' => null, 'webroot' => null, - 'baseUrl' => null + 'baseUrl' => null, ]; $base = $config['base']; $baseUrl = $config['baseUrl']; diff --git a/app/vendor/cakephp/cakephp/src/Http/Session.php b/app/vendor/cakephp/cakephp/src/Http/Session.php index 1f2a94992..20ba16a23 100644 --- a/app/vendor/cakephp/cakephp/src/Http/Session.php +++ b/app/vendor/cakephp/cakephp/src/Http/Session.php @@ -35,7 +35,6 @@ */ class Session { - /** * The Session handler instance used as an engine for persisting the session data. * @@ -142,7 +141,7 @@ protected static function _defaultConfig($name) 'cookie' => 'CAKEPHP', 'ini' => [ 'session.use_trans_sid' => 0, - ] + ], ], 'cake' => [ 'cookie' => 'CAKEPHP', @@ -151,8 +150,8 @@ protected static function _defaultConfig($name) 'session.serialize_handler' => 'php', 'session.use_cookies' => 1, 'session.save_path' => TMP . 'sessions', - 'session.save_handler' => 'files' - ] + 'session.save_handler' => 'files', + ], ], 'cache' => [ 'cookie' => 'CAKEPHP', @@ -163,8 +162,8 @@ protected static function _defaultConfig($name) ], 'handler' => [ 'engine' => 'CacheSession', - 'config' => 'default' - ] + 'config' => 'default', + ], ], 'database' => [ 'cookie' => 'CAKEPHP', @@ -175,9 +174,9 @@ protected static function _defaultConfig($name) 'session.serialize_handler' => 'php', ], 'handler' => [ - 'engine' => 'DatabaseSession' - ] - ] + 'engine' => 'DatabaseSession', + ], + ], ]; if (isset($defaults[$name])) { @@ -421,7 +420,7 @@ public function check($name = null) * Returns given session variable, or all of them, if no parameters given. * * @param string|null $name The name of the session variable (or a path as sent to Hash.extract) - * @return string|array|null The value of the session variable, null if session not available, + * @return mixed|null The value of the session variable, null if session not available, * session not started, or provided name not found in the session. */ public function read($name = null) @@ -605,17 +604,27 @@ public function renew() $this->start(); $params = session_get_cookie_params(); - setcookie( - session_name(), - '', - time() - 42000, - $params['path'], - $params['domain'], - $params['secure'], - $params['httponly'] - ); - - if (session_id()) { + if (PHP_VERSION_ID >= 70300) { + unset($params['lifetime']); + $params['expires'] = time() - 42000; + setcookie( + session_name(), + '', + $params + ); + } else { + setcookie( + session_name(), + '', + time() - 42000, + $params['path'], + $params['domain'], + $params['secure'], + $params['httponly'] + ); + } + + if (session_id() !== '') { session_regenerate_id(true); } } diff --git a/app/vendor/cakephp/cakephp/src/Http/Session/CacheSession.php b/app/vendor/cakephp/cakephp/src/Http/Session/CacheSession.php index 250567f2a..ab05b4e81 100644 --- a/app/vendor/cakephp/cakephp/src/Http/Session/CacheSession.php +++ b/app/vendor/cakephp/cakephp/src/Http/Session/CacheSession.php @@ -27,7 +27,6 @@ */ class CacheSession implements SessionHandlerInterface { - /** * Options for this session engine * @@ -41,7 +40,6 @@ class CacheSession implements SessionHandlerInterface * @param array $config The configuration to use for this engine * It requires the key 'config' which is the name of the Cache config to use for * storing the session - * * @throws \InvalidArgumentException if the 'config' key is not provided */ public function __construct(array $config = []) @@ -77,7 +75,7 @@ public function close() /** * Method used to read from a cache session. * - * @param string|int $id ID that uniquely identifies session in cache. + * @param string $id ID that uniquely identifies session in cache. * @return string Session data or empty string if it does not exist. */ public function read($id) @@ -94,8 +92,8 @@ public function read($id) /** * Helper function called on write for cache sessions. * - * @param string|int $id ID that uniquely identifies session in cache. - * @param mixed $data The data to be saved. + * @param string $id ID that uniquely identifies session in cache. + * @param string $data The data to be saved. * @return bool True for successful write, false otherwise. */ public function write($id, $data) @@ -110,7 +108,7 @@ public function write($id, $data) /** * Method called on the destruction of a cache session. * - * @param string|int $id ID that uniquely identifies session in cache. + * @param string $id ID that uniquely identifies session in cache. * @return bool Always true. */ public function destroy($id) diff --git a/app/vendor/cakephp/cakephp/src/I18n/ChainMessagesLoader.php b/app/vendor/cakephp/cakephp/src/I18n/ChainMessagesLoader.php index 9b613013d..4557c69bb 100644 --- a/app/vendor/cakephp/cakephp/src/I18n/ChainMessagesLoader.php +++ b/app/vendor/cakephp/cakephp/src/I18n/ChainMessagesLoader.php @@ -23,7 +23,6 @@ */ class ChainMessagesLoader { - /** * The list of callables to execute one after another for loading messages * diff --git a/app/vendor/cakephp/cakephp/src/I18n/DateFormatTrait.php b/app/vendor/cakephp/cakephp/src/I18n/DateFormatTrait.php index ba34a505a..423d1a7a1 100644 --- a/app/vendor/cakephp/cakephp/src/I18n/DateFormatTrait.php +++ b/app/vendor/cakephp/cakephp/src/I18n/DateFormatTrait.php @@ -26,7 +26,6 @@ */ trait DateFormatTrait { - /** * The default locale to be used for displaying formatted date strings. * @@ -35,6 +34,15 @@ trait DateFormatTrait */ public static $defaultLocale; + /** + * Whether lenient parsing is enabled for IntlDateFormatter. + * + * Defaults to true which is the default for IntlDateFormatter. + * + * @var bool + */ + protected static $lenientParsing = true; + /** * In-memory cache of date formatters * @@ -53,7 +61,7 @@ trait DateFormatTrait * will be used for formatting the date part of the object and the second position * will be used to format the time part. * - * @var string|array|int + * @var string|array|int|\Closure * @see \Cake\I18n\Time::i18nFormat() */ protected static $_jsonEncodeFormat = "yyyy-MM-dd'T'HH':'mm':'ssxxx"; @@ -78,6 +86,8 @@ public static function getDefaultLocale() /** * Sets the default locale. * + * Set to null to use IntlDateFormatter default. + * * @param string|null $locale The default locale string to be used or null. * @return void */ @@ -86,6 +96,36 @@ public static function setDefaultLocale($locale = null) static::$defaultLocale = $locale; } + /** + * Gets whether locale format parsing is set to lenient. + * + * @return bool + */ + public static function lenientParsingEnabled() + { + return static::$lenientParsing; + } + + /** + * Enables lenient parsing for locale formats. + * + * @return void + */ + public static function enableLenientParsing() + { + static::$lenientParsing = true; + } + + /** + * Enables lenient parsing for locale formats. + * + * @return void + */ + public static function disableLenientParsing() + { + static::$lenientParsing = false; + } + /** * Returns a nicely formatted date string for this object. * @@ -99,7 +139,7 @@ public static function setDefaultLocale($locale = null) */ public function nice($timezone = null, $locale = null) { - return $this->i18nFormat(static::$niceFormat, $timezone, $locale); + return (string)$this->i18nFormat(static::$niceFormat, $timezone, $locale); } /** @@ -148,7 +188,7 @@ public function nice($timezone = null, $locale = null) * You can control the default locale used through `Time::setDefaultLocale()`. * If empty, the default will be taken from the `intl.default_locale` ini config. * - * @param string|int|null $format Format string. + * @param string|int|array|null $format Format string. * @param string|\DateTimeZone|null $timezone Timezone string or DateTimeZone object * in which the date will be displayed. The timezone stored for this object will not * be changed. @@ -179,7 +219,7 @@ public function i18nFormat($format = null, $timezone = null, $locale = null) * Returns a translated and localized date string. * Implements what IntlDateFormatter::formatObject() is in PHP 5.5+ * - * @param \DateTime $date Date. + * @param \DateTime|\DateTimeImmutable $date Date. * @param string|int|array $format Format. * @param string|null $locale The locale name in which the date should be displayed. * @return string @@ -218,11 +258,11 @@ protected function _formatObject($date, $format, $locale) } $formatter = datefmt_create( $locale, - $dateFormat, - $timeFormat, + (int)$dateFormat, + (int)$timeFormat, $timezone, $calendar, - $pattern + (string)$pattern ); if (!$formatter) { throw new RuntimeException( @@ -241,7 +281,7 @@ protected function _formatObject($date, $format, $locale) */ public function __toString() { - return $this->i18nFormat(); + return (string)$this->i18nFormat(); } /** @@ -285,8 +325,11 @@ public static function setToStringFormat($format) * will be used for formatting the date part of the object and the second position * will be used to format the time part. * + * Alternatively, the format can provide a callback. In this case, the callback + * can receive this datetime object and return a formatted string. + * * @see \Cake\I18n\Time::i18nFormat() - * @param string|array|int $format Format. + * @param string|array|int|\Closure $format Format. * @return void */ public static function setJsonEncodeFormat($format) @@ -344,6 +387,8 @@ public static function parseDateTime($time, $format = null) null, $pattern ); + $formatter->setLenient(static::$lenientParsing); + $time = $formatter->parse($time); if ($time !== false) { $result = new static('@' . $time); @@ -423,6 +468,10 @@ public static function parseTime($time, $format = null) */ public function jsonSerialize() { + if (is_callable(static::$_jsonEncodeFormat)) { + return call_user_func(static::$_jsonEncodeFormat, $this); + } + return $this->i18nFormat(static::$_jsonEncodeFormat); } @@ -454,9 +503,9 @@ public static function diffFormatter($formatter = null) public function __debugInfo() { return [ - 'time' => $this->toIso8601String(), + 'time' => $this->format('Y-m-d H:i:s.uP'), 'timezone' => $this->getTimezone()->getName(), - 'fixedNowTime' => static::hasTestNow() ? static::getTestNow()->toIso8601String() : false + 'fixedNowTime' => static::hasTestNow() ? static::getTestNow()->format('Y-m-d\TH:i:s.uP') : false, ]; } } diff --git a/app/vendor/cakephp/cakephp/src/I18n/Formatter/IcuFormatter.php b/app/vendor/cakephp/cakephp/src/I18n/Formatter/IcuFormatter.php index c0cd00d02..e02d5264f 100644 --- a/app/vendor/cakephp/cakephp/src/I18n/Formatter/IcuFormatter.php +++ b/app/vendor/cakephp/cakephp/src/I18n/Formatter/IcuFormatter.php @@ -24,7 +24,6 @@ */ class IcuFormatter implements FormatterInterface { - /** * Returns a string with all passed variables interpolated into the original * message. Variables are interpolated using the MessageFormatter class. @@ -37,25 +36,6 @@ class IcuFormatter implements FormatterInterface * @throws \Aura\Intl\Exception\CannotInstantiateFormatter */ public function format($locale, $message, array $vars) - { - unset($vars['_singular'], $vars['_count']); - - return $this->_formatMessage($locale, $message, $vars); - } - - /** - * Does the actual formatting using the MessageFormatter class - * - * @param string $locale The locale in which the message is presented. - * @param string|array $message The message to be translated - * @param array $vars The list of values to interpolate in the message - * @return string The formatted message - * @throws \Aura\Intl\Exception\CannotInstantiateFormatter if any error occurred - * while parsing the message - * @throws \Aura\Intl\Exception\CannotFormat If any error related to the passed - * variables is found - */ - protected function _formatMessage($locale, $message, $vars) { if ($message === '') { return $message; diff --git a/app/vendor/cakephp/cakephp/src/I18n/Formatter/SprintfFormatter.php b/app/vendor/cakephp/cakephp/src/I18n/Formatter/SprintfFormatter.php index 2cb8d5dc3..460d7d3c8 100644 --- a/app/vendor/cakephp/cakephp/src/I18n/Formatter/SprintfFormatter.php +++ b/app/vendor/cakephp/cakephp/src/I18n/Formatter/SprintfFormatter.php @@ -22,7 +22,6 @@ */ class SprintfFormatter implements FormatterInterface { - /** * Returns a string with all passed variables interpolated into the original * message. Variables are interpolated using the sprintf format. @@ -34,8 +33,6 @@ class SprintfFormatter implements FormatterInterface */ public function format($locale, $message, array $vars) { - unset($vars['_singular']); - return vsprintf($message, $vars); } } diff --git a/app/vendor/cakephp/cakephp/src/I18n/FrozenTime.php b/app/vendor/cakephp/cakephp/src/I18n/FrozenTime.php index 7181d3fdc..61909ac17 100644 --- a/app/vendor/cakephp/cakephp/src/I18n/FrozenTime.php +++ b/app/vendor/cakephp/cakephp/src/I18n/FrozenTime.php @@ -111,7 +111,7 @@ public function __construct($time = null, $tz = null) { if ($time instanceof DateTimeInterface) { $tz = $time->getTimezone(); - $time = $time->format('Y-m-d H:i:s'); + $time = $time->format('Y-m-d H:i:s.u'); } if (is_numeric($time)) { diff --git a/app/vendor/cakephp/cakephp/src/I18n/I18n.php b/app/vendor/cakephp/cakephp/src/I18n/I18n.php index 8f18f529b..db3248652 100644 --- a/app/vendor/cakephp/cakephp/src/I18n/I18n.php +++ b/app/vendor/cakephp/cakephp/src/I18n/I18n.php @@ -26,7 +26,6 @@ */ class I18n { - /** * Default locale * @@ -62,7 +61,7 @@ public static function translators() } static::$_collection = new TranslatorRegistry( - new PackageLocator, + new PackageLocator(), new FormatterLocator([ 'sprintf' => function () { return new SprintfFormatter(); @@ -71,7 +70,7 @@ public static function translators() return new IcuFormatter(); }, ]), - new TranslatorFactory, + new TranslatorFactory(), static::getLocale() ); diff --git a/app/vendor/cakephp/cakephp/src/I18n/MessagesFileLoader.php b/app/vendor/cakephp/cakephp/src/I18n/MessagesFileLoader.php index 33cb7c7b0..f98691bef 100644 --- a/app/vendor/cakephp/cakephp/src/I18n/MessagesFileLoader.php +++ b/app/vendor/cakephp/cakephp/src/I18n/MessagesFileLoader.php @@ -29,7 +29,6 @@ */ class MessagesFileLoader { - /** * The package (domain) name. * @@ -135,7 +134,7 @@ public function __invoke() throw new RuntimeException(sprintf('Could not find class %s', "{$name}FileParser")); } - $messages = (new $class)->parse($file); + $messages = (new $class())->parse($file); $package = new Package('default'); $package->setMessages($messages); @@ -146,7 +145,7 @@ public function __invoke() * Returns the folders where the file should be looked for according to the locale * and package name. * - * @return array The list of folders where the translation file should be looked for + * @return string[] The list of folders where the translation file should be looked for */ public function translationsFolders() { @@ -154,7 +153,7 @@ public function translationsFolders() $folders = [ implode('_', [$locale['language'], $locale['region']]), - $locale['language'] + $locale['language'], ]; $searchPaths = []; diff --git a/app/vendor/cakephp/cakephp/src/I18n/Number.php b/app/vendor/cakephp/cakephp/src/I18n/Number.php index eaba2d444..060a7eef1 100644 --- a/app/vendor/cakephp/cakephp/src/I18n/Number.php +++ b/app/vendor/cakephp/cakephp/src/I18n/Number.php @@ -21,25 +21,32 @@ * * Methods to make numbers more readable. * - * @link https://book.cakephp.org/3.0/en/core-libraries/number.html + * @link https://book.cakephp.org/3/en/core-libraries/number.html */ class Number { - /** * Default locale - * - * @var string */ const DEFAULT_LOCALE = 'en_US'; /** * Format type to format as currency - * - * @var string */ const FORMAT_CURRENCY = 'currency'; + /** + * Format type to format as currency, accounting style (negative numbers in parentheses) + */ + const FORMAT_CURRENCY_ACCOUNTING = 'currency_accounting'; + + /** + * ICU Constant for accounting format; not yet widely supported by INTL library. + * This will be able to go away once CakePHP minimum PHP requirement is 7.4.1 or higher. + * See UNUM_CURRENCY_ACCOUNTING in https://unicode-org.github.io/icu-docs/apidoc/released/icu4c/unum_8h.html + */ + const CURRENCY_ACCOUNTING = 12; + /** * A list of number formatters indexed by locale and type * @@ -54,6 +61,13 @@ class Number */ protected static $_defaultCurrency; + /** + * Default currency format used by Number::currency() + * + * @var string + */ + protected static $_defaultCurrencyFormat; + /** * Formats a number with a level of precision. * @@ -61,11 +75,11 @@ class Number * * - `locale`: The locale name to use for formatting the number, e.g. fr_FR * - * @param float $value A floating point number. + * @param float|string $value A floating point number. * @param int $precision The precision of the returned number. * @param array $options Additional options * @return string Formatted float. - * @link https://book.cakephp.org/3.0/en/core-libraries/number.html#formatting-floating-point-numbers + * @link https://book.cakephp.org/3/en/core-libraries/number.html#formatting-floating-point-numbers */ public static function precision($value, $precision = 3, array $options = []) { @@ -77,12 +91,14 @@ public static function precision($value, $precision = 3, array $options = []) /** * Returns a formatted-for-humans file size. * - * @param int $size Size in bytes + * @param int|string $size Size in bytes * @return string Human readable size - * @link https://book.cakephp.org/3.0/en/core-libraries/number.html#interacting-with-human-readable-values + * @link https://book.cakephp.org/3/en/core-libraries/number.html#interacting-with-human-readable-values */ public static function toReadableSize($size) { + $size = (int)$size; + switch (true) { case $size < 1024: return __dn('cake', '{0,number,integer} Byte', '{0,number,integer} Bytes', $size, $size); @@ -105,20 +121,20 @@ public static function toReadableSize($size) * - `multiply`: Multiply the input value by 100 for decimal percentages. * - `locale`: The locale name to use for formatting the number, e.g. fr_FR * - * @param float $value A floating point number + * @param float|string $value A floating point number * @param int $precision The precision of the returned number * @param array $options Options * @return string Percentage string - * @link https://book.cakephp.org/3.0/en/core-libraries/number.html#formatting-percentages + * @link https://book.cakephp.org/3/en/core-libraries/number.html#formatting-percentages */ public static function toPercentage($value, $precision = 2, array $options = []) { - $options += ['multiply' => false]; - if ($options['multiply']) { - $value *= 100; + $options += ['multiply' => false, 'type' => NumberFormatter::PERCENT]; + if (!$options['multiply']) { + $value /= 100; } - return static::precision($value, $precision, $options) . '%'; + return static::precision($value, $precision, $options); } /** @@ -133,7 +149,7 @@ public static function toPercentage($value, $precision = 2, array $options = []) * - `before` - The string to place before whole numbers, e.g. '[' * - `after` - The string to place after decimal numbers, e.g. ']' * - * @param float $value A floating point number. + * @param float|string $value A floating point number. * @param array $options An array with options. * @return string Formatted number */ @@ -142,7 +158,7 @@ public static function format($value, array $options = []) $formatter = static::formatter($options); $options += ['before' => '', 'after' => '']; - return $options['before'] . $formatter->format($value) . $options['after']; + return $options['before'] . $formatter->format((float)$value) . $options['after']; } /** @@ -176,14 +192,14 @@ public static function parseFloat($value, array $options = []) * - `before` - The string to place before whole numbers, e.g. '[' * - `after` - The string to place after decimal numbers, e.g. ']' * - * @param float $value A floating point number + * @param float|string $value A floating point number * @param array $options Options list. * @return string formatted delta */ public static function formatDelta($value, array $options = []) { $options += ['places' => 0]; - $value = number_format($value, $options['places'], '.', ''); + $value = number_format((float)$value, $options['places'], '.', ''); $sign = $value > 0 ? '+' : ''; $options['before'] = isset($options['before']) ? $options['before'] . $sign : $sign; @@ -208,7 +224,7 @@ public static function formatDelta($value, array $options = []) * - `useIntlCode` - Whether or not to replace the currency symbol with the international * currency code. * - * @param float $value Value to format. + * @param float|string $value Value to format. * @param string|null $currency International currency name such as 'USD', 'EUR', 'JPY', 'CAD' * @param array $options Options list. * @return string Number formatted as a currency. @@ -216,13 +232,13 @@ public static function formatDelta($value, array $options = []) public static function currency($value, $currency = null, array $options = []) { $value = (float)$value; - $currency = $currency ?: static::defaultCurrency(); + $currency = $currency ?: static::getDefaultCurrency(); if (isset($options['zero']) && !$value) { return $options['zero']; } - $formatter = static::formatter(['type' => static::FORMAT_CURRENCY] + $options); + $formatter = static::formatter(['type' => static::getDefaultCurrencyFormat()] + $options); $abs = abs($value); if (!empty($options['fractionSymbol']) && $abs > 0 && $abs < 1) { $value *= 100; @@ -238,30 +254,89 @@ public static function currency($value, $currency = null, array $options = []) } /** - * Getter/setter for default currency + * Getter/setter for default currency. This behavior is *deprecated* and will be + * removed in future versions of CakePHP. * - * @param string|bool|null $currency Default currency string to be used by currency() + * @deprecated 3.9 Use getDefaultCurrency() and setDefaultCurrency() + * @param string|false|null $currency Default currency string to be used by currency() * if $currency argument is not provided. If boolean false is passed, it will clear the * currently stored value * @return string|null Currency */ public static function defaultCurrency($currency = null) { - if (!empty($currency)) { - return self::$_defaultCurrency = $currency; - } + deprecationWarning( + 'Number::defaultCurrency() is deprecated. ' . + 'Use Number::setDefaultCurrency()/getDefaultCurrency() instead.' + ); if ($currency === false) { - return self::$_defaultCurrency = null; + static::setDefaultCurrency(null); + + // This doesn't seem like a useful result to return, but it's what the old version did. + // Retaining it for backward compatibility. + return null; + } elseif ($currency !== null) { + static::setDefaultCurrency($currency); } - if (empty(self::$_defaultCurrency)) { + return static::getDefaultCurrency(); + } + + /** + * Getter for default currency + * + * @return string Currency + */ + public static function getDefaultCurrency() + { + if (static::$_defaultCurrency === null) { $locale = ini_get('intl.default_locale') ?: static::DEFAULT_LOCALE; $formatter = new NumberFormatter($locale, NumberFormatter::CURRENCY); - self::$_defaultCurrency = $formatter->getTextAttribute(NumberFormatter::CURRENCY_CODE); + static::$_defaultCurrency = $formatter->getTextAttribute(NumberFormatter::CURRENCY_CODE); } - return self::$_defaultCurrency; + return static::$_defaultCurrency; + } + + /** + * Setter for default currency + * + * @param string|null $currency Default currency string to be used by currency() + * if $currency argument is not provided. If null is passed, it will clear the + * currently stored value + * @return void + */ + public static function setDefaultCurrency($currency = null) + { + static::$_defaultCurrency = $currency; + } + + /** + * Getter for default currency format + * + * @return string Currency Format + */ + public static function getDefaultCurrencyFormat() + { + if (static::$_defaultCurrencyFormat === null) { + static::$_defaultCurrencyFormat = static::FORMAT_CURRENCY; + } + + return static::$_defaultCurrencyFormat; + } + + /** + * Setter for default currency format + * + * @param string|null $currencyFormat Default currency format to be used by currency() + * if $currencyFormat argument is not provided. If null is passed, it will clear the + * currently stored value + * @return void + */ + public static function setDefaultCurrencyFormat($currencyFormat = null) + { + static::$_defaultCurrencyFormat = $currencyFormat; } /** @@ -297,6 +372,12 @@ public static function formatter($options = []) $type = $options['type']; if ($options['type'] === static::FORMAT_CURRENCY) { $type = NumberFormatter::CURRENCY; + } elseif ($options['type'] === static::FORMAT_CURRENCY_ACCOUNTING) { + if (defined('NumberFormatter::CURRENCY_ACCOUNTING')) { + $type = NumberFormatter::CURRENCY_ACCOUNTING; + } else { + $type = static::CURRENCY_ACCOUNTING; + } } } @@ -304,13 +385,14 @@ public static function formatter($options = []) static::$_formatters[$locale][$type] = new NumberFormatter($locale, $type); } + /** @var \NumberFormatter $formatter */ $formatter = static::$_formatters[$locale][$type]; $options = array_intersect_key($options, [ 'places' => null, 'precision' => null, 'pattern' => null, - 'useIntlCode' => null + 'useIntlCode' => null, ]); if (empty($options)) { return $formatter; diff --git a/app/vendor/cakephp/cakephp/src/I18n/Parser/MoFileParser.php b/app/vendor/cakephp/cakephp/src/I18n/Parser/MoFileParser.php index f7a11b73c..c48471c55 100644 --- a/app/vendor/cakephp/cakephp/src/I18n/Parser/MoFileParser.php +++ b/app/vendor/cakephp/cakephp/src/I18n/Parser/MoFileParser.php @@ -17,14 +17,13 @@ use RuntimeException; /** - * Parses file in PO format + * Parses file in MO format * * @copyright Copyright (c) 2010, Union of RAD http://union-of-rad.org (http://lithify.me/) * @copyright Copyright (c) 2014, Fabien Potencier https://github.com/symfony/Translation/blob/master/LICENSE */ class MoFileParser { - /** * Magic used for validating the format of a MO file as well as * detecting if the machine used to create that file was little endian. @@ -53,7 +52,6 @@ class MoFileParser * was created on. Both 32bit and 64bit systems are supported. * * @param resource $resource The file to be parsed. - * * @return array List of messages extracted from the file * @throws \RuntimeException If stream content has an invalid format. */ @@ -69,9 +67,9 @@ public function parse($resource) $magic = unpack('V1', fread($stream, 4)); $magic = hexdec(substr(dechex(current($magic)), -8)); - if ($magic == self::MO_LITTLE_ENDIAN_MAGIC) { + if ($magic === self::MO_LITTLE_ENDIAN_MAGIC) { $isBigEndian = false; - } elseif ($magic == self::MO_BIG_ENDIAN_MAGIC) { + } elseif ($magic === self::MO_BIG_ENDIAN_MAGIC) { $isBigEndian = true; } else { throw new RuntimeException('Invalid format for MO translations file'); @@ -121,11 +119,11 @@ public function parse($resource) if ($pluralId !== null || strpos($translated, "\000") !== false) { $translated = explode("\000", $translated); - $plurals = $pluralId !== null ? array_map('stripcslashes', $translated) : null; + $plurals = $pluralId !== null ? $translated : null; $translated = $translated[0]; } - $singular = stripcslashes($translated); + $singular = $translated; if ($context !== null) { $messages[$singularId]['_context'][$context] = $singular; if ($pluralId !== null) { @@ -157,6 +155,6 @@ protected function _readLong($stream, $isBigEndian) $result = unpack($isBigEndian ? 'N1' : 'V1', fread($stream, 4)); $result = current($result); - return (int)substr($result, -8); + return (int)substr((string)$result, -8); } } diff --git a/app/vendor/cakephp/cakephp/src/I18n/Parser/PoFileParser.php b/app/vendor/cakephp/cakephp/src/I18n/Parser/PoFileParser.php index d0bbc4f36..2a8e80d1f 100644 --- a/app/vendor/cakephp/cakephp/src/I18n/Parser/PoFileParser.php +++ b/app/vendor/cakephp/cakephp/src/I18n/Parser/PoFileParser.php @@ -66,7 +66,6 @@ class PoFileParser * Items with an empty id are ignored. * * @param string $resource The file name to parse - * * @return array */ public function parse($resource) @@ -75,12 +74,12 @@ public function parse($resource) $defaults = [ 'ids' => [], - 'translated' => null + 'translated' => null, ]; $messages = []; $item = $defaults; - $stage = null; + $stage = []; while ($line = fgets($stream)) { $line = trim($line); @@ -89,7 +88,7 @@ public function parse($resource) // Whitespace indicated current item is done $this->_addMessage($messages, $item); $item = $defaults; - $stage = null; + $stage = []; } elseif (substr($line, 0, 7) === 'msgid "') { // We start a new msg so save previous $this->_addMessage($messages, $item); @@ -164,7 +163,7 @@ protected function _addMessage(array &$messages, array $item) // Make sure every index is filled. end($plurals); - $count = key($plurals); + $count = (int)key($plurals); // Fill missing spots with an empty string. $empties = array_fill(0, $count + 1, ''); diff --git a/app/vendor/cakephp/cakephp/src/I18n/PluralRules.php b/app/vendor/cakephp/cakephp/src/I18n/PluralRules.php index 0e4f66630..649058bdd 100644 --- a/app/vendor/cakephp/cakephp/src/I18n/PluralRules.php +++ b/app/vendor/cakephp/cakephp/src/I18n/PluralRules.php @@ -14,13 +14,14 @@ */ namespace Cake\I18n; +use Cake\Core\Exception\Exception; + /** * Utility class used to determine the plural number to be used for a variable * base on the locale */ class PluralRules { - /** * A map of locale => plurals group used to determine * which plural rules apply to the language @@ -151,50 +152,52 @@ public static function calculate($locale, $n) case 0: return 0; case 1: - return $n == 1 ? 0 : 1; + return $n === 1 ? 0 : 1; case 2: return $n > 1 ? 1 : 0; case 3: - return $n % 10 == 1 && $n % 100 != 11 ? 0 : + return $n % 10 === 1 && $n % 100 !== 11 ? 0 : (($n % 10 >= 2 && $n % 10 <= 4) && ($n % 100 < 10 || $n % 100 >= 20) ? 1 : 2); case 4: - return $n == 1 ? 0 : + return $n === 1 ? 0 : ($n >= 2 && $n <= 4 ? 1 : 2); case 5: - return $n == 1 ? 0 : - ($n == 2 ? 1 : ($n < 7 ? 2 : ($n < 11 ? 3 : 4))); + return $n === 1 ? 0 : + ($n === 2 ? 1 : ($n < 7 ? 2 : ($n < 11 ? 3 : 4))); case 6: - return $n % 10 == 1 && $n % 100 != 11 ? 0 : + return $n % 10 === 1 && $n % 100 !== 11 ? 0 : ($n % 10 >= 2 && ($n % 100 < 10 || $n % 100 >= 20) ? 1 : 2); case 7: - return $n % 100 == 1 ? 1 : - ($n % 100 == 2 ? 2 : ($n % 100 == 3 || $n % 100 == 4 ? 3 : 0)); + return $n % 100 === 1 ? 1 : + ($n % 100 === 2 ? 2 : ($n % 100 === 3 || $n % 100 === 4 ? 3 : 0)); case 8: - return $n % 10 == 1 ? 0 : ($n % 10 == 2 ? 1 : 2); + return $n % 10 === 1 ? 0 : ($n % 10 === 2 ? 1 : 2); case 9: - return $n == 1 ? 0 : - ($n == 0 || ($n % 100 > 0 && $n % 100 <= 10) ? 1 : + return $n === 1 ? 0 : + ($n === 0 || ($n % 100 > 0 && $n % 100 <= 10) ? 1 : ($n % 100 > 10 && $n % 100 < 20 ? 2 : 3)); case 10: - return $n % 10 == 1 && $n % 100 != 11 ? 0 : ($n != 0 ? 1 : 2); + return $n % 10 === 1 && $n % 100 !== 11 ? 0 : ($n !== 0 ? 1 : 2); case 11: - return $n == 1 ? 0 : + return $n === 1 ? 0 : ($n % 10 >= 2 && $n % 10 <= 4 && ($n % 100 < 10 || $n % 100 >= 20) ? 1 : 2); case 12: - return $n == 1 ? 0 : - ($n == 0 || $n % 100 > 0 && $n % 100 < 20 ? 1 : 2); + return $n === 1 ? 0 : + ($n === 0 || $n % 100 > 0 && $n % 100 < 20 ? 1 : 2); case 13: - return $n == 0 ? 0 : - ($n == 1 ? 1 : - ($n == 2 ? 2 : + return $n === 0 ? 0 : + ($n === 1 ? 1 : + ($n === 2 ? 2 : ($n % 100 >= 3 && $n % 100 <= 10 ? 3 : ($n % 100 >= 11 ? 4 : 5)))); case 14: - return $n == 1 ? 0 : - ($n == 2 ? 1 : - ($n != 8 && $n != 11 ? 2 : 3)); + return $n === 1 ? 0 : + ($n === 2 ? 1 : + ($n !== 8 && $n !== 11 ? 2 : 3)); case 15: - return ($n % 10 != 1 || $n % 100 == 11) ? 1 : 0; + return $n % 10 !== 1 || $n % 100 === 11 ? 1 : 0; } + + throw new Exception('Unable to find plural rule number.'); } } diff --git a/app/vendor/cakephp/cakephp/src/I18n/README.md b/app/vendor/cakephp/cakephp/src/I18n/README.md index 72ff29ff0..93f2e6ecc 100644 --- a/app/vendor/cakephp/cakephp/src/I18n/README.md +++ b/app/vendor/cakephp/cakephp/src/I18n/README.md @@ -31,7 +31,7 @@ use Cake\Core\Configure; Configure::write('App.paths.locales', ['/path/with/trailing/slash/']); ``` -Please refer to the [CakePHP Manual](https://book.cakephp.org/3.0/en/core-libraries/internationalization-and-localization.html#language-files) for details +Please refer to the [CakePHP Manual](https://book.cakephp.org/3/en/core-libraries/internationalization-and-localization.html#language-files) for details about expected folder structure and file naming. ### Translating a Message @@ -92,12 +92,12 @@ echo Number::currency(123456.7890, 'EUR'); ## Documentation Please make sure you check the [official I18n -documentation](https://book.cakephp.org/3.0/en/core-libraries/internationalization-and-localization.html). +documentation](https://book.cakephp.org/3/en/core-libraries/internationalization-and-localization.html). The [documentation for the Time -class](https://book.cakephp.org/3.0/en/core-libraries/time.html) contains +class](https://book.cakephp.org/3/en/core-libraries/time.html) contains instructions on how to configure and output time strings for selected locales. The [documentation for the Number -class](https://book.cakephp.org/3.0/en/core-libraries/number.html) shows how to +class](https://book.cakephp.org/3/en/core-libraries/number.html) shows how to use the `Number` class for displaying numbers in specific locales. diff --git a/app/vendor/cakephp/cakephp/src/I18n/RelativeTimeFormatter.php b/app/vendor/cakephp/cakephp/src/I18n/RelativeTimeFormatter.php index d921f7812..c19fff189 100644 --- a/app/vendor/cakephp/cakephp/src/I18n/RelativeTimeFormatter.php +++ b/app/vendor/cakephp/cakephp/src/I18n/RelativeTimeFormatter.php @@ -154,7 +154,7 @@ public function timeAgoInWords(DateTimeInterface $time, array $options = []) 'day' => __d('cake', 'about a day ago'), 'week' => __d('cake', 'about a week ago'), 'month' => __d('cake', 'about a month ago'), - 'year' => __d('cake', 'about a year ago') + 'year' => __d('cake', 'about a year ago'), ]; return $relativeDate ? sprintf($options['relativeString'], $relativeDate) : $aboutAgo[$fWord]; @@ -171,7 +171,7 @@ public function timeAgoInWords(DateTimeInterface $time, array $options = []) 'day' => __d('cake', 'in about a day'), 'week' => __d('cake', 'in about a week'), 'month' => __d('cake', 'in about a month'), - 'year' => __d('cake', 'in about a year') + 'year' => __d('cake', 'in about a year'), ]; return $aboutIn[$fWord]; @@ -332,7 +332,7 @@ public function dateAgoInWords(DateTimeInterface $date, array $options = []) 'day' => __d('cake', 'about a day ago'), 'week' => __d('cake', 'about a week ago'), 'month' => __d('cake', 'about a month ago'), - 'year' => __d('cake', 'about a year ago') + 'year' => __d('cake', 'about a year ago'), ]; return $relativeDate ? sprintf($options['relativeString'], $relativeDate) : $aboutAgo[$fWord]; @@ -346,7 +346,7 @@ public function dateAgoInWords(DateTimeInterface $date, array $options = []) 'day' => __d('cake', 'in about a day'), 'week' => __d('cake', 'in about a week'), 'month' => __d('cake', 'in about a month'), - 'year' => __d('cake', 'in about a year') + 'year' => __d('cake', 'in about a year'), ]; return $aboutIn[$fWord]; diff --git a/app/vendor/cakephp/cakephp/src/I18n/Time.php b/app/vendor/cakephp/cakephp/src/I18n/Time.php index e13af084f..e67b2c2e5 100644 --- a/app/vendor/cakephp/cakephp/src/I18n/Time.php +++ b/app/vendor/cakephp/cakephp/src/I18n/Time.php @@ -109,7 +109,7 @@ public function __construct($time = null, $tz = null) { if ($time instanceof DateTimeInterface) { $tz = $time->getTimezone(); - $time = $time->format('Y-m-d H:i:s'); + $time = $time->format('Y-m-d H:i:s.u'); } if (is_numeric($time)) { @@ -168,11 +168,11 @@ public function isThisYear() * Returns the quarter * * @param bool $range Range. - * @return int|array 1, 2, 3, or 4 quarter of year, or array if $range true + * @return string[]|int 1, 2, 3, or 4 quarter of year, or array if $range true */ public function toQuarter($range = false) { - $quarter = (int)ceil($this->format('m') / 3); + $quarter = (int)ceil((int)$this->format('m') / 3); if ($range === false) { return $quarter; } diff --git a/app/vendor/cakephp/cakephp/src/I18n/Translator.php b/app/vendor/cakephp/cakephp/src/I18n/Translator.php index 880471a03..4c4751bca 100644 --- a/app/vendor/cakephp/cakephp/src/I18n/Translator.php +++ b/app/vendor/cakephp/cakephp/src/I18n/Translator.php @@ -21,13 +21,14 @@ */ class Translator extends BaseTranslator { - + /** + * @var string + */ const PLURAL_PREFIX = 'p:'; /** * Translates the message formatting any placeholders * - * * @param string $key The message key. * @param array $tokensValues Token values to interpolate into the * message. @@ -74,7 +75,7 @@ public function translate($key, array $tokensValues = []) // Resolve plural form. if (is_array($message)) { - $count = isset($tokensValues['_count']) ? $tokensValues['_count'] : 0; + $count = isset($tokensValues['_count']) ? (int)$tokensValues['_count'] : 0; $form = PluralRules::calculate($this->locale, $count); $message = isset($message[$form]) ? $message[$form] : (string)end($message); } @@ -83,6 +84,8 @@ public function translate($key, array $tokensValues = []) $message = $key; } + unset($tokensValues['_count'], $tokensValues['_singular']); + return $this->formatter->format($this->locale, $message, $tokensValues); } @@ -92,7 +95,7 @@ public function translate($key, array $tokensValues = []) * @param string $key The message key being handled. * @param string|array $message The message content. * @param array $vars The variables containing the `_context` key. - * @return string + * @return string|array */ protected function resolveContext($key, $message, array $vars) { diff --git a/app/vendor/cakephp/cakephp/src/I18n/TranslatorFactory.php b/app/vendor/cakephp/cakephp/src/I18n/TranslatorFactory.php index 79c370196..c34f9e2b0 100644 --- a/app/vendor/cakephp/cakephp/src/I18n/TranslatorFactory.php +++ b/app/vendor/cakephp/cakephp/src/I18n/TranslatorFactory.php @@ -32,7 +32,7 @@ class TranslatorFactory extends BaseTranslatorFactory * * @var string */ - protected $class = 'Cake\I18n\Translator'; + protected $class = Translator::class; /** * Returns a new Translator. diff --git a/app/vendor/cakephp/cakephp/src/I18n/TranslatorRegistry.php b/app/vendor/cakephp/cakephp/src/I18n/TranslatorRegistry.php index df06dc61b..b773501a7 100644 --- a/app/vendor/cakephp/cakephp/src/I18n/TranslatorRegistry.php +++ b/app/vendor/cakephp/cakephp/src/I18n/TranslatorRegistry.php @@ -26,7 +26,6 @@ */ class TranslatorRegistry extends TranslatorLocator { - /** * A list of loader functions indexed by domain name. Loaders are * callables that are invoked as a default for building translation @@ -87,7 +86,7 @@ public function __construct( $this->registerLoader($this->_fallbackLoader, function ($name, $locale) { $chain = new ChainMessagesLoader([ new MessagesFileLoader($name, $locale, 'mo'), - new MessagesFileLoader($name, $locale, 'po') + new MessagesFileLoader($name, $locale, 'po'), ]); // \Aura\Intl\Package by default uses formatter configured with key "basic". @@ -119,7 +118,7 @@ public function setCacher(CacheEngine $cacher) /** * Gets a translator from the registry by package for a locale. * - * @param string $name The translator package to retrieve. + * @param string|null $name The translator package to retrieve. * @param string|null $locale The locale to use; if empty, uses the default * locale. * @return \Aura\Intl\TranslatorInterface|null A translator object. @@ -286,7 +285,7 @@ public function setLoaderFallback($name, callable $loader) return $loader; } $loader = function () use ($loader, $fallbackDomain) { - /* @var \Aura\Intl\Package $package */ + /** @var \Aura\Intl\Package $package */ $package = $loader(); if (!$package->getFallback()) { $package->setFallback($fallbackDomain); diff --git a/app/vendor/cakephp/cakephp/src/I18n/composer.json b/app/vendor/cakephp/cakephp/src/I18n/composer.json index 7ffc86fa6..611e487ad 100644 --- a/app/vendor/cakephp/cakephp/src/I18n/composer.json +++ b/app/vendor/cakephp/cakephp/src/I18n/composer.json @@ -28,7 +28,7 @@ "source": "https://github.com/cakephp/i18n" }, "require": { - "php": ">=5.6.0", + "php": ">=5.6.0,<8.0.0", "ext-intl": "*", "cakephp/core": "^3.6.0", "cakephp/chronos": "^1.0.0", diff --git a/app/vendor/cakephp/cakephp/src/I18n/functions.php b/app/vendor/cakephp/cakephp/src/I18n/functions.php index 65f46ab68..bbb6aeeda 100644 --- a/app/vendor/cakephp/cakephp/src/I18n/functions.php +++ b/app/vendor/cakephp/cakephp/src/I18n/functions.php @@ -12,6 +12,7 @@ * @since 3.0.0 * @license https://opensource.org/licenses/mit-license.php MIT License */ + use Cake\I18n\I18n; if (!function_exists('__')) { @@ -19,14 +20,14 @@ * Returns a translated string if one is found; Otherwise, the submitted message. * * @param string $singular Text to translate. - * @param array ...$args Array with arguments or multiple arguments in function. - * @return string|null The translated text, or null if invalid. - * @link https://book.cakephp.org/3.0/en/core-libraries/global-constants-and-functions.html#__ + * @param mixed ...$args Array with arguments or multiple arguments in function. + * @return string The translated text. + * @link https://book.cakephp.org/3/en/core-libraries/global-constants-and-functions.html#__ */ function __($singular, ...$args) { if (!$singular) { - return null; + return ''; } if (isset($args[0]) && is_array($args[0])) { $args = $args[0]; @@ -45,14 +46,14 @@ function __($singular, ...$args) * @param string $singular Singular text to translate. * @param string $plural Plural text. * @param int $count Count. - * @param array ...$args Array with arguments or multiple arguments in function. - * @return string|null Plural form of translated string, or null if invalid. - * @link https://book.cakephp.org/3.0/en/core-libraries/global-constants-and-functions.html#__n + * @param mixed ...$args Array with arguments or multiple arguments in function. + * @return string Plural form of translated string. + * @link https://book.cakephp.org/3/en/core-libraries/global-constants-and-functions.html#__n */ function __n($singular, $plural, $count, ...$args) { if (!$singular) { - return null; + return ''; } if (isset($args[0]) && is_array($args[0])) { $args = $args[0]; @@ -72,14 +73,14 @@ function __n($singular, $plural, $count, ...$args) * * @param string $domain Domain. * @param string $msg String to translate. - * @param array ...$args Array with arguments or multiple arguments in function. - * @return string|null Translated string. - * @link https://book.cakephp.org/3.0/en/core-libraries/global-constants-and-functions.html#__d + * @param mixed ...$args Array with arguments or multiple arguments in function. + * @return string Translated string. + * @link https://book.cakephp.org/3/en/core-libraries/global-constants-and-functions.html#__d */ function __d($domain, $msg, ...$args) { if (!$msg) { - return null; + return ''; } if (isset($args[0]) && is_array($args[0])) { $args = $args[0]; @@ -100,14 +101,14 @@ function __d($domain, $msg, ...$args) * @param string $singular Singular string to translate. * @param string $plural Plural. * @param int $count Count. - * @param array ...$args Array with arguments or multiple arguments in function. - * @return string|null Plural form of translated string. - * @link https://book.cakephp.org/3.0/en/core-libraries/global-constants-and-functions.html#__dn + * @param mixed ...$args Array with arguments or multiple arguments in function. + * @return string Plural form of translated string. + * @link https://book.cakephp.org/3/en/core-libraries/global-constants-and-functions.html#__dn */ function __dn($domain, $singular, $plural, $count, ...$args) { if (!$singular) { - return null; + return ''; } if (isset($args[0]) && is_array($args[0])) { $args = $args[0]; @@ -129,14 +130,14 @@ function __dn($domain, $singular, $plural, $count, ...$args) * * @param string $context Context of the text. * @param string $singular Text to translate. - * @param array ...$args Array with arguments or multiple arguments in function. - * @return string|null Translated string. - * @link https://book.cakephp.org/3.0/en/core-libraries/global-constants-and-functions.html#__x + * @param mixed ...$args Array with arguments or multiple arguments in function. + * @return string Translated string. + * @link https://book.cakephp.org/3/en/core-libraries/global-constants-and-functions.html#__x */ function __x($context, $singular, ...$args) { if (!$singular) { - return null; + return ''; } if (isset($args[0]) && is_array($args[0])) { $args = $args[0]; @@ -158,14 +159,14 @@ function __x($context, $singular, ...$args) * @param string $singular Singular text to translate. * @param string $plural Plural text. * @param int $count Count. - * @param array ...$args Array with arguments or multiple arguments in function. - * @return string|null Plural form of translated string. - * @link https://book.cakephp.org/3.0/en/core-libraries/global-constants-and-functions.html#__xn + * @param mixed ...$args Array with arguments or multiple arguments in function. + * @return string Plural form of translated string. + * @link https://book.cakephp.org/3/en/core-libraries/global-constants-and-functions.html#__xn */ function __xn($context, $singular, $plural, $count, ...$args) { if (!$singular) { - return null; + return ''; } if (isset($args[0]) && is_array($args[0])) { $args = $args[0]; @@ -188,14 +189,14 @@ function __xn($context, $singular, $plural, $count, ...$args) * @param string $domain Domain. * @param string $context Context of the text. * @param string $msg String to translate. - * @param array ...$args Array with arguments or multiple arguments in function. - * @return string|null Translated string. - * @link https://book.cakephp.org/3.0/en/core-libraries/global-constants-and-functions.html#__dx + * @param mixed ...$args Array with arguments or multiple arguments in function. + * @return string Translated string. + * @link https://book.cakephp.org/3/en/core-libraries/global-constants-and-functions.html#__dx */ function __dx($domain, $context, $msg, ...$args) { if (!$msg) { - return null; + return ''; } if (isset($args[0]) && is_array($args[0])) { $args = $args[0]; @@ -221,14 +222,14 @@ function __dx($domain, $context, $msg, ...$args) * @param string $singular Singular text to translate. * @param string $plural Plural text. * @param int $count Count. - * @param array ...$args Array with arguments or multiple arguments in function. - * @return string|null Plural form of translated string. - * @link https://book.cakephp.org/3.0/en/core-libraries/global-constants-and-functions.html#__dxn + * @param mixed ...$args Array with arguments or multiple arguments in function. + * @return string Plural form of translated string. + * @link https://book.cakephp.org/3/en/core-libraries/global-constants-and-functions.html#__dxn */ function __dxn($domain, $context, $singular, $plural, $count, ...$args) { if (!$singular) { - return null; + return ''; } if (isset($args[0]) && is_array($args[0])) { $args = $args[0]; diff --git a/app/vendor/cakephp/cakephp/src/Log/Engine/BaseLog.php b/app/vendor/cakephp/cakephp/src/Log/Engine/BaseLog.php index 1aca5140e..2ef6fcc3f 100644 --- a/app/vendor/cakephp/cakephp/src/Log/Engine/BaseLog.php +++ b/app/vendor/cakephp/cakephp/src/Log/Engine/BaseLog.php @@ -33,7 +33,7 @@ abstract class BaseLog extends AbstractLogger */ protected $_defaultConfig = [ 'levels' => [], - 'scopes' => [] + 'scopes' => [], ]; /** @@ -71,7 +71,7 @@ public function levels() /** * Get the scopes this logger is interested in. * - * @return array + * @return array|false */ public function scopes() { diff --git a/app/vendor/cakephp/cakephp/src/Log/Engine/ConsoleLog.php b/app/vendor/cakephp/cakephp/src/Log/Engine/ConsoleLog.php index 4d9e71176..6566df300 100644 --- a/app/vendor/cakephp/cakephp/src/Log/Engine/ConsoleLog.php +++ b/app/vendor/cakephp/cakephp/src/Log/Engine/ConsoleLog.php @@ -22,7 +22,6 @@ */ class ConsoleLog extends BaseLog { - /** * Default config for this class * diff --git a/app/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php b/app/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php index 5e424be34..e9114529d 100644 --- a/app/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php +++ b/app/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php @@ -23,7 +23,6 @@ */ class FileLog extends BaseLog { - /** * Default config for this class * @@ -86,7 +85,8 @@ public function __construct(array $config = []) if (!empty($this->_config['path'])) { $this->_path = $this->_config['path']; } - if ($this->_path !== null && + if ( + $this->_path !== null && Configure::read('debug') && !is_dir($this->_path) ) { @@ -185,7 +185,8 @@ protected function _rotateFile($filename) $filePath = $this->_path . $filename; clearstatcache(true, $filePath); - if (!file_exists($filePath) || + if ( + !file_exists($filePath) || filesize($filePath) < $this->_size ) { return null; diff --git a/app/vendor/cakephp/cakephp/src/Log/Engine/SyslogLog.php b/app/vendor/cakephp/cakephp/src/Log/Engine/SyslogLog.php index 503c9ce2a..efbeb0f82 100644 --- a/app/vendor/cakephp/cakephp/src/Log/Engine/SyslogLog.php +++ b/app/vendor/cakephp/cakephp/src/Log/Engine/SyslogLog.php @@ -19,7 +19,6 @@ */ class SyslogLog extends BaseLog { - /** * Default config for this class * @@ -54,7 +53,7 @@ class SyslogLog extends BaseLog 'format' => '%s: %s', 'flag' => LOG_ODELAY, 'prefix' => '', - 'facility' => LOG_USER + 'facility' => LOG_USER, ]; /** @@ -70,7 +69,7 @@ class SyslogLog extends BaseLog 'warning' => LOG_WARNING, 'notice' => LOG_NOTICE, 'info' => LOG_INFO, - 'debug' => LOG_DEBUG + 'debug' => LOG_DEBUG, ]; /** diff --git a/app/vendor/cakephp/cakephp/src/Log/Log.php b/app/vendor/cakephp/cakephp/src/Log/Log.php index 894c2f03d..61997446a 100644 --- a/app/vendor/cakephp/cakephp/src/Log/Log.php +++ b/app/vendor/cakephp/cakephp/src/Log/Log.php @@ -103,7 +103,6 @@ */ class Log { - use StaticConfigTrait { setConfig as protected _setConfig; } @@ -111,7 +110,7 @@ class Log /** * An array mapping url schemes to fully qualified Log engine class names * - * @var array + * @var string[] */ protected static $_dsnClassMap = [ 'console' => 'Cake\Log\Engine\ConsoleLog', @@ -136,7 +135,7 @@ class Log /** * Handled log levels * - * @var array + * @var string[] */ protected static $_levels = [ 'emergency', @@ -146,7 +145,7 @@ class Log 'warning', 'notice', 'info', - 'debug' + 'debug', ]; /** @@ -223,7 +222,7 @@ public static function reset() * Call this method to obtain current * level configuration. * - * @return array active log levels + * @return string[] active log levels */ public static function levels() { diff --git a/app/vendor/cakephp/cakephp/src/Log/LogEngineRegistry.php b/app/vendor/cakephp/cakephp/src/Log/LogEngineRegistry.php index 0fa534f79..48202f018 100644 --- a/app/vendor/cakephp/cakephp/src/Log/LogEngineRegistry.php +++ b/app/vendor/cakephp/cakephp/src/Log/LogEngineRegistry.php @@ -24,7 +24,6 @@ */ class LogEngineRegistry extends ObjectRegistry { - /** * Resolve a logger classname. * @@ -48,7 +47,7 @@ protected function _resolveClassName($class) * Part of the template method for Cake\Core\ObjectRegistry::load() * * @param string $class The classname that is missing. - * @param string $plugin The plugin the logger is missing in. + * @param string|null $plugin The plugin the logger is missing in. * @return void * @throws \RuntimeException */ @@ -95,10 +94,12 @@ protected function _create($class, $alias, $settings) * Remove a single logger from the registry. * * @param string $name The logger name. - * @return void + * @return $this */ public function unload($name) { unset($this->_loaded[$name]); + + return $this; } } diff --git a/app/vendor/cakephp/cakephp/src/Log/LogTrait.php b/app/vendor/cakephp/cakephp/src/Log/LogTrait.php index 31b943e87..0aac978f6 100644 --- a/app/vendor/cakephp/cakephp/src/Log/LogTrait.php +++ b/app/vendor/cakephp/cakephp/src/Log/LogTrait.php @@ -21,18 +21,17 @@ */ trait LogTrait { - /** * Convenience method to write a message to Log. See Log::write() * for more information on writing to logs. * - * @param mixed $msg Log message. + * @param mixed $message Log message. * @param int|string $level Error level. * @param string|array $context Additional log data relevant to this message. * @return bool Success of log write. */ - public function log($msg, $level = LogLevel::ERROR, $context = []) + public function log($message, $level = LogLevel::ERROR, $context = []) { - return Log::write($level, $msg, $context); + return Log::write($level, $message, $context); } } diff --git a/app/vendor/cakephp/cakephp/src/Log/README.md b/app/vendor/cakephp/cakephp/src/Log/README.md index 200a8a43d..8eead7995 100644 --- a/app/vendor/cakephp/cakephp/src/Log/README.md +++ b/app/vendor/cakephp/cakephp/src/Log/README.md @@ -8,7 +8,7 @@ multiple logging backends using a simple interface. With the `Log` class it is possible to send a single message to multiple logging backends at the same time or just a subset of them based on the log level or context. -By default you can use Files or Syslog as logging backends, but you can use any +By default, you can use Files or Syslog as logging backends, but you can use any object implementing `Psr\Log\LoggerInterface` as an engine for the `Log` class. ## Usage @@ -80,4 +80,4 @@ Log::warning('this gets written only to payments.log', ['scope' => ['payments']] ## Documentation -Please make sure you check the [official documentation](https://book.cakephp.org/3.0/en/core-libraries/logging.html) +Please make sure you check the [official documentation](https://book.cakephp.org/3/en/core-libraries/logging.html) diff --git a/app/vendor/cakephp/cakephp/src/Log/composer.json b/app/vendor/cakephp/cakephp/src/Log/composer.json index a775a4f9f..eeb2dacc3 100644 --- a/app/vendor/cakephp/cakephp/src/Log/composer.json +++ b/app/vendor/cakephp/cakephp/src/Log/composer.json @@ -23,7 +23,7 @@ "source": "https://github.com/cakephp/log" }, "require": { - "php": ">=5.6.0", + "php": ">=5.6.0,<8.0.0", "cakephp/core": "^3.6.0", "psr/log": "^1.0.0" }, diff --git a/app/vendor/cakephp/cakephp/src/Mailer/Email.php b/app/vendor/cakephp/cakephp/src/Mailer/Email.php index d9a9807c1..59f1e0d2a 100644 --- a/app/vendor/cakephp/cakephp/src/Mailer/Email.php +++ b/app/vendor/cakephp/cakephp/src/Mailer/Email.php @@ -49,7 +49,6 @@ */ class Email implements JsonSerializable, Serializable { - use StaticConfigTrait; use ViewVarsTrait; @@ -110,7 +109,7 @@ class Email implements JsonSerializable, Serializable protected $_sender = []; /** - * The email the recipient will reply to + * List of email(s) that the recipient will reply to. * * @var array */ @@ -258,7 +257,7 @@ class Email implements JsonSerializable, Serializable '8bit', 'base64', 'binary', - 'quoted-printable' + 'quoted-printable', ]; /** @@ -295,7 +294,7 @@ class Email implements JsonSerializable, Serializable * An array mapping url schemes to fully qualified Transport class names. * Unused. * - * @var array + * @var string[] * @deprecated 3.7.0 This property is unused and will be removed in 4.0.0. */ protected static $_dsnClassMap = []; @@ -321,7 +320,7 @@ class Email implements JsonSerializable, Serializable * @var array */ protected $_contentTypeCharset = [ - 'ISO-2022-JP-MS' => 'ISO-2022-JP' + 'ISO-2022-JP-MS' => 'ISO-2022-JP', ]; /** @@ -422,13 +421,14 @@ public function from($email = null, $name = null) } /** - * Sets "sender" address. + * Sets the "sender" address. See rfc link below for full explanation. * * @param string|array $email String with email, * Array with email as key, name as value or email as value (without name) * @param string|null $name Name * @return $this * @throws \InvalidArgumentException + * @link https://tools.ietf.org/html/rfc2822.html#section-3.6.2 */ public function setSender($email, $name = null) { @@ -436,9 +436,10 @@ public function setSender($email, $name = null) } /** - * Gets "sender" address. + * Gets the "sender" address. See rfc link below for full explanation. * * @return array + * @link https://tools.ietf.org/html/rfc2822.html#section-3.6.2 */ public function getSender() { @@ -477,7 +478,7 @@ public function sender($email = null, $name = null) */ public function setReplyTo($email, $name = null) { - return $this->_setEmailSingle('_replyTo', $email, $name, 'Reply-To requires only 1 email address.'); + return $this->_setEmail('_replyTo', $email, $name); } /** @@ -833,7 +834,7 @@ public function setHeaderCharset($charset) */ public function getHeaderCharset() { - return $this->headerCharset; + return $this->headerCharset ? $this->headerCharset : $this->charset; } /** @@ -916,7 +917,7 @@ public function getEmailPattern() * EmailPattern setter/getter * * @deprecated 3.4.0 Use setEmailPattern()/getEmailPattern() instead. - * @param string|bool|null $regex The pattern to use for email address validation, + * @param string|false|null $regex The pattern to use for email address validation, * null to unset the pattern and make use of filter_var() instead, false or * nothing to return the current value * @return string|$this @@ -1166,11 +1167,20 @@ public function getHeaders(array $include = []) 'from' => 'From', 'replyTo' => 'Reply-To', 'readReceipt' => 'Disposition-Notification-To', - 'returnPath' => 'Return-Path' + 'returnPath' => 'Return-Path', + 'to' => 'To', + 'cc' => 'Cc', + 'bcc' => 'Bcc', ]; - foreach ($relation as $var => $header) { - if ($include[$var]) { - $var = '_' . $var; + $headerMultipleEmails = ['to', 'cc', 'bcc', 'replyTo']; + foreach ($relation as $key => $header) { + $var = '_' . $key; + if (!$include[$key]) { + continue; + } + if (in_array($key, $headerMultipleEmails, true)) { + $headers[$header] = implode(', ', $this->_formatAddress($this->{$var})); + } else { $headers[$header] = current($this->_formatAddress($this->{$var})); } } @@ -1182,13 +1192,6 @@ public function getHeaders(array $include = []) } } - foreach (['to', 'cc', 'bcc'] as $var) { - if ($include[$var]) { - $classVar = '_' . $var; - $headers[ucfirst($var)] = implode(', ', $this->_formatAddress($this->{$classVar})); - } - } - $headers += $this->_headers; if (!isset($headers['Date'])) { $headers['Date'] = date(DATE_RFC2822); @@ -1257,6 +1260,7 @@ protected function _formatAddress($address) * * @param string|null $template Template name or null to not use. * @return $this + * @deprecated 3.7.0 Use $email->viewBuilder()->setTemplate() instead. */ public function setTemplate($template) { @@ -1273,6 +1277,7 @@ public function setTemplate($template) * Gets template. * * @return string + * @deprecated 3.7.0 Use $email->viewBuilder()->getTemplate() instead. */ public function getTemplate() { @@ -1334,13 +1339,13 @@ public function template($template = false, $layout = false) if ($template === false) { return [ - 'template' => $this->getTemplate(), - 'layout' => $this->getLayout() + 'template' => $this->viewBuilder()->getTemplate(), + 'layout' => $this->viewBuilder()->getLayout(), ]; } - $this->setTemplate($template); + $this->viewBuilder()->setTemplate($template); if ($layout !== false) { - $this->setLayout($layout); + $this->viewBuilder()->setLayout($layout); } return $this; @@ -1476,10 +1481,12 @@ public function theme($theme = null) ); if ($theme === null) { - return $this->getTheme(); + return $this->viewBuilder()->getTheme(); } - return $this->setTheme($theme); + $this->viewBuilder()->setTheme($theme); + + return $this; } /** @@ -1529,10 +1536,12 @@ public function helpers($helpers = null) ); if ($helpers === null) { - return $this->getHelpers(); + return $this->viewBuilder()->getHelpers(); } - return $this->setHelpers((array)$helpers); + $this->viewBuilder()->setHelpers((array)$helpers); + + return $this; } /** @@ -2094,7 +2103,7 @@ public function getProfile() * Get/Set the configuration profile to use for this instance. * * @deprecated 3.4.0 Use setProfile()/getProfile() instead. - * @param null|string|array $config String with configuration name, or + * @param array|string|null $config String with configuration name, or * an array with config or null to return current config. * @return string|array|$this */ @@ -2156,7 +2165,7 @@ protected function _logDelivery($contents) } $config = [ 'level' => 'debug', - 'scope' => 'email' + 'scope' => 'email', ]; if ($this->_profile['log'] !== true) { if (!is_array($this->_profile['log'])) { @@ -2200,7 +2209,7 @@ public static function deliver($to = null, $subject = null, $message = null, $co if (is_array($config) && !isset($config['transport'])) { $config['transport'] = 'default'; } - /* @var \Cake\Mailer\Email $instance */ + /** @var \Cake\Mailer\Email $instance */ $instance = new $class($config); if ($to !== null) { $instance->setTo($to); @@ -2245,7 +2254,7 @@ protected function _applyConfig($config) $simpleMethods = [ 'from', 'sender', 'to', 'replyTo', 'readReceipt', 'returnPath', 'cc', 'bcc', 'messageId', 'domain', 'subject', 'attachments', - 'transport', 'emailFormat', 'emailPattern', 'charset', 'headerCharset' + 'transport', 'emailFormat', 'emailPattern', 'charset', 'headerCharset', ]; foreach ($simpleMethods as $method) { if (isset($config[$method])) { @@ -2261,7 +2270,7 @@ protected function _applyConfig($config) } $viewBuilderMethods = [ - 'template', 'layout', 'theme' + 'template', 'layout', 'theme', ]; foreach ($viewBuilderMethods as $method) { if (array_key_exists($method, $config)) { @@ -2453,7 +2462,7 @@ protected function _wrap($message, $wrapLength = Email::LINE_LENGTH_MUST) $tmpLine .= $char; $tmpLineLength++; if ($tmpLineLength === $wrapLength) { - $nextChar = $line[$i + 1]; + $nextChar = isset($line[$i + 1]) ? $line[$i + 1] : ''; if ($nextChar === ' ' || $nextChar === '<') { $formatted[] = trim($tmpLine); $tmpLine = ''; @@ -2516,7 +2525,7 @@ protected function _attachFiles($boundary = null) !isset($fileInfo['contentDisposition']) || $fileInfo['contentDisposition'] ); - $part = new FormDataPart(false, $data, false); + $part = new FormDataPart('', $data, '', $this->getHeaderCharset()); if ($hasDisposition) { $part->disposition('attachment'); @@ -2566,7 +2575,7 @@ protected function _attachInlineFiles($boundary = null) $data = isset($fileInfo['data']) ? $fileInfo['data'] : $this->_readFile($fileInfo['file']); $msg[] = '--' . $boundary; - $part = new FormDataPart(false, $data, 'inline'); + $part = new FormDataPart('', $data, 'inline', $this->getHeaderCharset()); $part->type($fileInfo['mimetype']); $part->transferEncoding('base64'); $part->contentId($fileInfo['contentId']); @@ -2794,7 +2803,7 @@ public function jsonSerialize() $properties = [ '_to', '_from', '_sender', '_replyTo', '_cc', '_bcc', '_subject', '_returnPath', '_readReceipt', '_emailFormat', '_emailPattern', '_domain', - '_attachments', '_messageId', '_headers', '_appCharset', 'viewVars', 'charset', 'headerCharset' + '_attachments', '_messageId', '_headers', '_appCharset', 'viewVars', 'charset', 'headerCharset', ]; $array = ['viewConfig' => $this->viewBuilder()->jsonSerialize()]; @@ -2830,7 +2839,8 @@ protected function _checkViewVars(&$item, $key) $item = (string)$item; } - if (is_resource($item) || + if ( + is_resource($item) || $item instanceof Closure || $item instanceof PDO ) { diff --git a/app/vendor/cakephp/cakephp/src/Mailer/Exception/MissingActionException.php b/app/vendor/cakephp/cakephp/src/Mailer/Exception/MissingActionException.php index d1a9734eb..25bc6fc7e 100644 --- a/app/vendor/cakephp/cakephp/src/Mailer/Exception/MissingActionException.php +++ b/app/vendor/cakephp/cakephp/src/Mailer/Exception/MissingActionException.php @@ -19,7 +19,6 @@ */ class MissingActionException extends Exception { - /** * {@inheritDoc} */ diff --git a/app/vendor/cakephp/cakephp/src/Mailer/Exception/MissingMailerException.php b/app/vendor/cakephp/cakephp/src/Mailer/Exception/MissingMailerException.php index f3e7f8872..070d60e6b 100644 --- a/app/vendor/cakephp/cakephp/src/Mailer/Exception/MissingMailerException.php +++ b/app/vendor/cakephp/cakephp/src/Mailer/Exception/MissingMailerException.php @@ -21,6 +21,8 @@ */ class MissingMailerException extends Exception { - + /** + * @inheritDoc + */ protected $_messageTemplate = 'Mailer class "%s" could not be found.'; } diff --git a/app/vendor/cakephp/cakephp/src/Mailer/Mailer.php b/app/vendor/cakephp/cakephp/src/Mailer/Mailer.php index 38c301b4e..43eaf8713 100644 --- a/app/vendor/cakephp/cakephp/src/Mailer/Mailer.php +++ b/app/vendor/cakephp/cakephp/src/Mailer/Mailer.php @@ -161,7 +161,6 @@ */ abstract class Mailer implements EventListenerInterface { - use ModelAwareTrait; /** diff --git a/app/vendor/cakephp/cakephp/src/Mailer/MailerAwareTrait.php b/app/vendor/cakephp/cakephp/src/Mailer/MailerAwareTrait.php index 8b98f50da..402e18beb 100644 --- a/app/vendor/cakephp/cakephp/src/Mailer/MailerAwareTrait.php +++ b/app/vendor/cakephp/cakephp/src/Mailer/MailerAwareTrait.php @@ -26,7 +26,6 @@ */ trait MailerAwareTrait { - /** * Returns a mailer instance. * diff --git a/app/vendor/cakephp/cakephp/src/Mailer/Transport/DebugTransport.php b/app/vendor/cakephp/cakephp/src/Mailer/Transport/DebugTransport.php index 0f973c03c..e93f6be47 100644 --- a/app/vendor/cakephp/cakephp/src/Mailer/Transport/DebugTransport.php +++ b/app/vendor/cakephp/cakephp/src/Mailer/Transport/DebugTransport.php @@ -25,7 +25,6 @@ */ class DebugTransport extends AbstractTransport { - /** * Send mail * diff --git a/app/vendor/cakephp/cakephp/src/Mailer/Transport/MailTransport.php b/app/vendor/cakephp/cakephp/src/Mailer/Transport/MailTransport.php index 885eff625..1916a3cf9 100644 --- a/app/vendor/cakephp/cakephp/src/Mailer/Transport/MailTransport.php +++ b/app/vendor/cakephp/cakephp/src/Mailer/Transport/MailTransport.php @@ -25,7 +25,6 @@ */ class MailTransport extends AbstractTransport { - /** * Send mail * diff --git a/app/vendor/cakephp/cakephp/src/Mailer/Transport/SmtpTransport.php b/app/vendor/cakephp/cakephp/src/Mailer/Transport/SmtpTransport.php index 835245059..4df6382e1 100644 --- a/app/vendor/cakephp/cakephp/src/Mailer/Transport/SmtpTransport.php +++ b/app/vendor/cakephp/cakephp/src/Mailer/Transport/SmtpTransport.php @@ -25,7 +25,6 @@ */ class SmtpTransport extends AbstractTransport { - /** * Default config for this class * @@ -39,13 +38,13 @@ class SmtpTransport extends AbstractTransport 'password' => null, 'client' => null, 'tls' => false, - 'keepAlive' => false + 'keepAlive' => false, ]; /** * Socket to SMTP server * - * @var \Cake\Network\Socket + * @var \Cake\Network\Socket|null */ protected $_socket; @@ -200,7 +199,7 @@ protected function _bufferResponseLines(array $responseLines) if (preg_match('/^(\d{3})(?:[ -]+(.*))?$/', $responseLine, $match)) { $response[] = [ 'code' => $match[1], - 'message' => isset($match[2]) ? $match[2] : null + 'message' => isset($match[2]) ? $match[2] : null, ]; } } @@ -258,24 +257,66 @@ protected function _connect() */ protected function _auth() { - if (isset($this->_config['username'], $this->_config['password'])) { - $replyCode = (string)$this->_smtpSend('AUTH LOGIN', '334|500|502|504'); - if ($replyCode === '334') { - try { - $this->_smtpSend(base64_encode($this->_config['username']), '334'); - } catch (SocketException $e) { - throw new SocketException('SMTP server did not accept the username.', null, $e); - } - try { - $this->_smtpSend(base64_encode($this->_config['password']), '235'); - } catch (SocketException $e) { - throw new SocketException('SMTP server did not accept the password.', null, $e); - } - } elseif ($replyCode === '504') { - throw new SocketException('SMTP authentication method not allowed, check if SMTP server requires TLS.'); - } else { - throw new SocketException('AUTH command not recognized or not implemented, SMTP server may not require authentication.'); + if (!isset($this->_config['username'], $this->_config['password'])) { + return; + } + + $username = $this->_config['username']; + $password = $this->_config['password']; + + $replyCode = $this->_authPlain($username, $password); + if ($replyCode === '235') { + return; + } + + $this->_authLogin($username, $password); + } + + /** + * Authenticate using AUTH PLAIN mechanism. + * + * @param string $username Username. + * @param string $password Password. + * @return string|null Response code for the command. + */ + protected function _authPlain($username, $password) + { + return $this->_smtpSend( + sprintf( + 'AUTH PLAIN %s', + base64_encode(chr(0) . $username . chr(0) . $password) + ), + '235|504|534|535' + ); + } + + /** + * Authenticate using AUTH LOGIN mechanism. + * + * @param string $username Username. + * @param string $password Password. + * @return void + */ + protected function _authLogin($username, $password) + { + $replyCode = $this->_smtpSend('AUTH LOGIN', '334|500|502|504'); + if ($replyCode === '334') { + try { + $this->_smtpSend(base64_encode($username), '334'); + } catch (SocketException $e) { + throw new SocketException('SMTP server did not accept the username.', null, $e); } + try { + $this->_smtpSend(base64_encode($password), '235'); + } catch (SocketException $e) { + throw new SocketException('SMTP server did not accept the password.', null, $e); + } + } elseif ($replyCode === '504') { + throw new SocketException('SMTP authentication method not allowed, check if SMTP server requires TLS.'); + } else { + throw new SocketException( + 'AUTH command not recognized or not implemented, SMTP server may not require authentication.' + ); } } @@ -427,7 +468,7 @@ protected function _generateSocket() * Protected method for sending data to SMTP connection * * @param string|null $data Data to be sent to SMTP server - * @param string|bool $checkCode Code to check for in server response, false to skip + * @param string|false $checkCode Code to check for in server response, false to skip * @return string|null The matched code, or null if nothing matched * @throws \Cake\Network\Exception\SocketException */ diff --git a/app/vendor/cakephp/cakephp/src/Mailer/TransportFactory.php b/app/vendor/cakephp/cakephp/src/Mailer/TransportFactory.php index 77516151a..633289ad8 100644 --- a/app/vendor/cakephp/cakephp/src/Mailer/TransportFactory.php +++ b/app/vendor/cakephp/cakephp/src/Mailer/TransportFactory.php @@ -34,7 +34,7 @@ class TransportFactory /** * An array mapping url schemes to fully qualified Transport class names * - * @var array + * @var string[] */ protected static $_dsnClassMap = [ 'debug' => 'Cake\Mailer\Transport\DebugTransport', diff --git a/app/vendor/cakephp/cakephp/src/Mailer/TransportRegistry.php b/app/vendor/cakephp/cakephp/src/Mailer/TransportRegistry.php index 3fba03b48..a2ededa03 100644 --- a/app/vendor/cakephp/cakephp/src/Mailer/TransportRegistry.php +++ b/app/vendor/cakephp/cakephp/src/Mailer/TransportRegistry.php @@ -58,7 +58,7 @@ protected function _resolveClassName($class) * Part of the template method for Cake\Core\ObjectRegistry::load() * * @param string $class The classname that is missing. - * @param string $plugin The plugin the cache is missing in. + * @param string|null $plugin The plugin the cache is missing in. * @return void * @throws \BadMethodCallException */ @@ -103,10 +103,12 @@ protected function _create($class, $alias, $config) * Remove a single adapter from the registry. * * @param string $name The adapter name. - * @return void + * @return $this */ public function unload($name) { unset($this->_loaded[$name]); + + return $this; } } diff --git a/app/vendor/cakephp/cakephp/src/Network/Exception/SocketException.php b/app/vendor/cakephp/cakephp/src/Network/Exception/SocketException.php index 3dcfb64cd..5819ddef7 100644 --- a/app/vendor/cakephp/cakephp/src/Network/Exception/SocketException.php +++ b/app/vendor/cakephp/cakephp/src/Network/Exception/SocketException.php @@ -20,7 +20,6 @@ */ class SocketException extends Exception { - /** * {@inheritDoc} */ diff --git a/app/vendor/cakephp/cakephp/src/Network/Socket.php b/app/vendor/cakephp/cakephp/src/Network/Socket.php index 9bc06e3fe..d8b4dbe74 100644 --- a/app/vendor/cakephp/cakephp/src/Network/Socket.php +++ b/app/vendor/cakephp/cakephp/src/Network/Socket.php @@ -14,6 +14,7 @@ */ namespace Cake\Network; +use Cake\Core\Exception\Exception as CakeException; use Cake\Core\InstanceConfigTrait; use Cake\Network\Exception\SocketException; use Cake\Validation\Validation; @@ -46,7 +47,7 @@ class Socket 'host' => 'localhost', 'protocol' => 'tcp', 'port' => 80, - 'timeout' => 30 + 'timeout' => 30, ]; /** @@ -166,7 +167,8 @@ public function connect() if ($port > 0) { $remoteSocketTarget .= ':' . $port; } - $this->connection = stream_socket_client( + + $this->connection = $this->_getStreamSocketClient( $remoteSocketTarget, $errNum, $errStr, @@ -194,6 +196,29 @@ public function connect() return $this->connected; } + /** + * Create a stream socket client. Mock utility. + * + * @param string $remoteSocketTarget remote socket + * @param int $errNum error number + * @param string $errStr error string + * @param int $timeout timeout + * @param int $connectAs flags + * @param resource $context context + * @return bool|resource + */ + protected function _getStreamSocketClient($remoteSocketTarget, &$errNum, &$errStr, $timeout, $connectAs, $context) + { + return stream_socket_client( + $remoteSocketTarget, + $errNum, + $errStr, + $timeout, + $connectAs, + $context + ); + } + /** * Configure the SSL context options. * @@ -247,7 +272,7 @@ protected function _connectionErrorHandler($code, $message) /** * Get the connection context. * - * @return null|array Null when there is no connection, an array when there is. + * @return array|null Null when there is no connection, an array when there is. */ public function context() { @@ -472,6 +497,9 @@ public function enableCrypto($type, $clientOrServer = 'client', $enable = true) } try { + if ($this->connection === null) { + throw new CakeException('You must call connect() first.'); + } $enableCryptoResult = stream_socket_enable_crypto($this->connection, $enable, $method); } catch (Exception $e) { $this->setLastError(null, $e->getMessage()); diff --git a/app/vendor/cakephp/cakephp/src/ORM/Association.php b/app/vendor/cakephp/cakephp/src/ORM/Association.php index a408c8338..96d945807 100644 --- a/app/vendor/cakephp/cakephp/src/ORM/Association.php +++ b/app/vendor/cakephp/cakephp/src/ORM/Association.php @@ -34,7 +34,6 @@ */ abstract class Association { - use ConventionsTrait; use LocatorAwareTrait; @@ -188,12 +187,12 @@ abstract class Association /** * Valid strategies for this association. Subclasses can narrow this down. * - * @var array + * @var string[] */ protected $_validStrategies = [ self::STRATEGY_JOIN, self::STRATEGY_SELECT, - self::STRATEGY_SUBQUERY + self::STRATEGY_SUBQUERY, ]; /** @@ -217,7 +216,7 @@ public function __construct($alias, array $options = []) 'tableLocator', 'propertyName', 'sourceTable', - 'targetTable' + 'targetTable', ]; foreach ($defaults as $property) { if (isset($options[$property])) { @@ -345,7 +344,8 @@ public function cascadeCallbacks($cascadeCallbacks = null) */ public function setClassName($className) { - if ($this->_targetTable !== null && + if ( + $this->_targetTable !== null && get_class($this->_targetTable) !== App::className($className, 'Model/Table', 'Table') ) { throw new InvalidArgumentException( @@ -994,7 +994,7 @@ public function attachTo(Query $query, array $options = []) 'fields' => [], 'type' => $joinType, 'table' => $table, - 'finder' => $this->getFinder() + 'finder' => $this->getFinder(), ]; if (!empty($options['foreignKey'])) { @@ -1264,7 +1264,7 @@ protected function _formatAssociationResults($query, $surrogate, $options) $property = $options['propertyPath']; $propertyPath = explode('.', $property); - $query->formatResults(function ($results) use ($formatters, $property, $propertyPath) { + $query->formatResults(function ($results) use ($formatters, $property, $propertyPath, $query) { $extracted = []; foreach ($results as $result) { foreach ($propertyPath as $propertyPathItem) { @@ -1281,8 +1281,17 @@ protected function _formatAssociationResults($query, $surrogate, $options) $extracted = new ResultSetDecorator($callable($extracted)); } - /* @var \Cake\Collection\CollectionInterface $results */ - return $results->insert($property, $extracted); + /** @var \Cake\Collection\CollectionInterface $results */ + $results = $results->insert($property, $extracted); + if ($query->isHydrationEnabled()) { + $results = $results->map(function ($result) { + $result->clean(); + + return $result; + }); + } + + return $results; }, Query::PREPEND); } @@ -1523,7 +1532,7 @@ abstract public function isOwningSide(Table $side); * * @param \Cake\Datasource\EntityInterface $entity the data to be saved * @param array $options The options for saving associated data. - * @return bool|\Cake\Datasource\EntityInterface false if $entity could not be saved, otherwise it returns + * @return \Cake\Datasource\EntityInterface|false False if $entity could not be saved, otherwise it returns * the saved entity * @see \Cake\ORM\Table::save() */ diff --git a/app/vendor/cakephp/cakephp/src/ORM/Association/BelongsTo.php b/app/vendor/cakephp/cakephp/src/ORM/Association/BelongsTo.php index 651f81e30..dac887d80 100644 --- a/app/vendor/cakephp/cakephp/src/ORM/Association/BelongsTo.php +++ b/app/vendor/cakephp/cakephp/src/ORM/Association/BelongsTo.php @@ -30,21 +30,20 @@ */ class BelongsTo extends Association { - /** * Valid strategies for this type of association * - * @var array + * @var string[] */ protected $_validStrategies = [ self::STRATEGY_JOIN, - self::STRATEGY_SELECT + self::STRATEGY_SELECT, ]; /** * Gets the name of the field representing the foreign key to the target table. * - * @return string + * @return string|string[] */ public function getForeignKey() { @@ -112,7 +111,7 @@ public function type() * * @param \Cake\Datasource\EntityInterface $entity an entity from the source table * @param array $options options to be passed to the save method in the target table - * @return bool|\Cake\Datasource\EntityInterface false if $entity could not be saved, otherwise it returns + * @return \Cake\Datasource\EntityInterface|false False if $entity could not be saved, otherwise it returns * the saved entity * @see \Cake\ORM\Table::save() */ @@ -143,7 +142,7 @@ public function saveAssociated(EntityInterface $entity, array $options = []) * clause for getting the results on the target table. * * @param array $options list of options passed to attachTo method - * @return array + * @return \Cake\Database\Expression\IdentifierExpression[] * @throws \RuntimeException if the number of columns in the foreignKey do not * match the number of columns in the target table primaryKey */ @@ -194,7 +193,7 @@ public function eagerLoader(array $options) 'bindingKey' => $this->getBindingKey(), 'strategy' => $this->getStrategy(), 'associationType' => $this->type(), - 'finder' => [$this, 'find'] + 'finder' => [$this, 'find'], ]); return $loader->buildEagerLoader($options); diff --git a/app/vendor/cakephp/cakephp/src/ORM/Association/BelongsToMany.php b/app/vendor/cakephp/cakephp/src/ORM/Association/BelongsToMany.php index 9020fd837..aad0f83c9 100644 --- a/app/vendor/cakephp/cakephp/src/ORM/Association/BelongsToMany.php +++ b/app/vendor/cakephp/cakephp/src/ORM/Association/BelongsToMany.php @@ -17,6 +17,7 @@ use Cake\Core\App; use Cake\Database\ExpressionInterface; use Cake\Database\Expression\IdentifierExpression; +use Cake\Database\Expression\QueryExpression; use Cake\Datasource\EntityInterface; use Cake\Datasource\QueryInterface; use Cake\ORM\Association; @@ -36,7 +37,6 @@ */ class BelongsToMany extends Association { - /** * Saving strategy that will only append to the links set * @@ -119,11 +119,11 @@ class BelongsToMany extends Association /** * Valid strategies for this type of association * - * @var array + * @var string[] */ protected $_validStrategies = [ self::STRATEGY_SELECT, - self::STRATEGY_SUBQUERY + self::STRATEGY_SUBQUERY, ]; /** @@ -139,14 +139,14 @@ class BelongsToMany extends Association /** * Filtered conditions that reference the target table. * - * @var null|array + * @var array|null */ protected $_targetConditions; /** * Filtered conditions that reference the junction table. * - * @var null|array + * @var array|null */ protected $_junctionConditions; @@ -220,7 +220,7 @@ public function canBeJoined(array $options = []) /** * Gets the name of the field representing the foreign key to the source table. * - * @return string + * @return string|string[] */ public function getForeignKey() { @@ -353,10 +353,17 @@ protected function _generateTargetAssociations($junction, $source, $target) { $junctionAlias = $junction->getAlias(); $sAlias = $source->getAlias(); + $tAlias = $target->getAlias(); + + $targetBindingKey = null; + if ($junction->hasAssociation($tAlias)) { + $targetBindingKey = $junction->getAssociation($tAlias)->getBindingKey(); + } if (!$target->hasAssociation($junctionAlias)) { $target->hasMany($junctionAlias, [ 'targetTable' => $junction, + 'bindingKey' => $targetBindingKey, 'foreignKey' => $this->getTargetForeignKey(), 'strategy' => $this->_strategy, ]); @@ -391,9 +398,17 @@ protected function _generateTargetAssociations($junction, $source, $target) protected function _generateSourceAssociations($junction, $source) { $junctionAlias = $junction->getAlias(); + $sAlias = $source->getAlias(); + + $sourceBindingKey = null; + if ($junction->hasAssociation($sAlias)) { + $sourceBindingKey = $junction->getAssociation($sAlias)->getBindingKey(); + } + if (!$source->hasAssociation($junctionAlias)) { $source->hasMany($junctionAlias, [ 'targetTable' => $junction, + 'bindingKey' => $sourceBindingKey, 'foreignKey' => $this->getForeignKey(), 'strategy' => $this->_strategy, ]); @@ -424,13 +439,13 @@ protected function _generateJunctionAssociations($junction, $source, $target) if (!$junction->hasAssociation($tAlias)) { $junction->belongsTo($tAlias, [ 'foreignKey' => $this->getTargetForeignKey(), - 'targetTable' => $target + 'targetTable' => $target, ]); } if (!$junction->hasAssociation($sAlias)) { $junction->belongsTo($sAlias, [ 'foreignKey' => $this->getForeignKey(), - 'targetTable' => $source + 'targetTable' => $source, ]); } } @@ -514,12 +529,12 @@ protected function _appendNotMatching($query, $options) $assoc = $junction->getAssociation($this->getTarget()->getAlias()); $conditions = $assoc->_joinCondition([ - 'foreignKey' => $this->getTargetForeignKey() + 'foreignKey' => $this->getTargetForeignKey(), ]); $subquery = $this->_appendJunctionJoin($subquery, $conditions); $query - ->andWhere(function ($exp) use ($subquery, $conds) { + ->andWhere(function (QueryExpression $exp) use ($subquery, $conds) { $identifiers = []; foreach (array_keys($conds) as $field) { $identifiers[] = new IdentifierExpression($field); @@ -528,7 +543,7 @@ protected function _appendNotMatching($query, $options) $nullExp = clone $exp; return $exp - ->or_([ + ->or([ $exp->notIn($identifiers, $subquery), $nullExp->and(array_map([$nullExp, 'isNull'], array_keys($conds))), ]); @@ -579,7 +594,7 @@ public function eagerLoader(array $options) 'junctionConditions' => $this->junctionConditions(), 'finder' => function () { return $this->_appendJunctionJoin($this->find(), []); - } + }, ]); return $loader->buildEagerLoader($options); @@ -704,7 +719,7 @@ public function saveStrategy($strategy = null) * @param array $options options to be passed to the save method in the target table * @throws \InvalidArgumentException if the property representing the association * in the parent entity cannot be traversed - * @return bool|\Cake\Datasource\EntityInterface false if $entity could not be saved, otherwise it returns + * @return \Cake\Datasource\EntityInterface|false False if $entity could not be saved, otherwise it returns * the saved entity * @see \Cake\ORM\Table::save() * @see \Cake\ORM\Association\BelongsToMany::replaceLinks() @@ -744,7 +759,7 @@ public function saveAssociated(EntityInterface $entity, array $options = []) * @param array $options list of options accepted by `Table::save()` * @throws \InvalidArgumentException if the property representing the association * in the parent entity cannot be traversed - * @return \Cake\Datasource\EntityInterface|bool The parent entity after all links have been + * @return \Cake\Datasource\EntityInterface|false The parent entity after all links have been * created if no errors happened, false otherwise */ protected function _saveTarget(EntityInterface $parentEntity, $entities, $options) @@ -822,7 +837,7 @@ protected function _saveLinks(EntityInterface $sourceEntity, $targetEntities, $o $belongsTo = $junction->getAssociation($target->getAlias()); $foreignKey = (array)$this->getForeignKey(); $assocForeignKey = (array)$belongsTo->getForeignKey(); - $targetPrimaryKey = (array)$target->getPrimaryKey(); + $targetBindingKey = (array)$belongsTo->getBindingKey(); $bindingKey = (array)$this->getBindingKey(); $jointProperty = $this->_junctionProperty; $junctionRegistryAlias = $junction->getRegistryAlias(); @@ -833,7 +848,7 @@ protected function _saveLinks(EntityInterface $sourceEntity, $targetEntities, $o $joint = new $entityClass([], ['markNew' => true, 'source' => $junctionRegistryAlias]); } $sourceKeys = array_combine($foreignKey, $sourceEntity->extract($bindingKey)); - $targetKeys = array_combine($assocForeignKey, $e->extract($targetPrimaryKey)); + $targetKeys = array_combine($assocForeignKey, $e->extract($targetBindingKey)); $changedKeys = ( $sourceKeys !== $joint->extract($foreignKey) || @@ -844,7 +859,7 @@ protected function _saveLinks(EntityInterface $sourceEntity, $targetEntities, $o // as new, we let save() sort out whether or not we have a new link // or if we are updating an existing link. if ($changedKeys) { - $joint->isNew(true); + $joint->setNew(true); $joint->unsetProperty($junction->getPrimaryKey()) ->set(array_merge($sourceKeys, $targetKeys), ['guard' => false]); } @@ -945,7 +960,7 @@ public function unlink(EntityInterface $sourceEntity, array $targetEntities, $op { if (is_bool($options)) { $options = [ - 'cleanProperty' => $options + 'cleanProperty' => $options, ]; } else { $options += ['cleanProperty' => true]; @@ -1112,7 +1127,7 @@ public function find($type = null, array $options = []) $belongsTo = $this->junction()->getAssociation($this->getTarget()->getAlias()); $conditions = $belongsTo->_joinCondition([ - 'foreignKey' => $this->getTargetForeignKey() + 'foreignKey' => $this->getTargetForeignKey(), ]); $conditions += $this->junctionConditions(); @@ -1135,8 +1150,8 @@ protected function _appendJunctionJoin($query, $conditions) $name => [ 'table' => $this->junction()->getTable(), 'conditions' => $conditions, - 'type' => QueryInterface::JOIN_TYPE_INNER - ] + 'type' => QueryInterface::JOIN_TYPE_INNER, + ], ]; $assoc = $this->getTarget()->getAssociation($name); @@ -1434,7 +1449,7 @@ protected function _junctionTableName($name = null) if (empty($this->_junctionTableName)) { $tablesNames = array_map('Cake\Utility\Inflector::underscore', [ $this->getSource()->getTable(), - $this->getTarget()->getTable() + $this->getTarget()->getTable(), ]); sort($tablesNames); $this->_junctionTableName = implode('_', $tablesNames); diff --git a/app/vendor/cakephp/cakephp/src/ORM/Association/DependentDeleteHelper.php b/app/vendor/cakephp/cakephp/src/ORM/Association/DependentDeleteHelper.php index 5bd74aff6..7e395c56b 100644 --- a/app/vendor/cakephp/cakephp/src/ORM/Association/DependentDeleteHelper.php +++ b/app/vendor/cakephp/cakephp/src/ORM/Association/DependentDeleteHelper.php @@ -24,7 +24,6 @@ */ class DependentDeleteHelper { - /** * Cascade a delete to remove dependent records. * diff --git a/app/vendor/cakephp/cakephp/src/ORM/Association/DependentDeleteTrait.php b/app/vendor/cakephp/cakephp/src/ORM/Association/DependentDeleteTrait.php index aab6048a1..16d30d746 100644 --- a/app/vendor/cakephp/cakephp/src/ORM/Association/DependentDeleteTrait.php +++ b/app/vendor/cakephp/cakephp/src/ORM/Association/DependentDeleteTrait.php @@ -26,7 +26,6 @@ */ trait DependentDeleteTrait { - /** * Cascade a delete to remove dependent records. * diff --git a/app/vendor/cakephp/cakephp/src/ORM/Association/HasMany.php b/app/vendor/cakephp/cakephp/src/ORM/Association/HasMany.php index 3d39cbe74..f8c238849 100644 --- a/app/vendor/cakephp/cakephp/src/ORM/Association/HasMany.php +++ b/app/vendor/cakephp/cakephp/src/ORM/Association/HasMany.php @@ -1,6 +1,5 @@ isNew() || + if ( + $entity->isNew() || $this->getSaveStrategy() !== self::SAVE_REPLACE ) { return $entity; @@ -180,7 +179,8 @@ public function saveAssociated(EntityInterface $entity, array $options = []) $targetEntities = []; } - if (!is_array($targetEntities) && + if ( + !is_array($targetEntities) && !($targetEntities instanceof Traversable) ) { $name = $this->getProperty(); @@ -195,7 +195,8 @@ public function saveAssociated(EntityInterface $entity, array $options = []) $options['_sourceTable'] = $this->getSource(); - if ($this->_saveStrategy === self::SAVE_REPLACE && + if ( + $this->_saveStrategy === self::SAVE_REPLACE && !$this->_unlinkAssociated($foreignKeyReference, $entity, $this->getTarget(), $targetEntities, $options) ) { return false; @@ -357,7 +358,7 @@ public function unlink(EntityInterface $sourceEntity, array $targetEntities, $op { if (is_bool($options)) { $options = [ - 'cleanProperty' => $options + 'cleanProperty' => $options, ]; } else { $options += ['cleanProperty' => true]; @@ -377,7 +378,7 @@ public function unlink(EntityInterface $sourceEntity, array $targetEntities, $op /** @var \Cake\Datasource\EntityInterface $entity */ return $entity->extract($targetPrimaryKey); }) - ->toList() + ->toList(), ]; $this->_unlink($foreignKey, $target, $conditions, $options); @@ -493,9 +494,9 @@ function ($v) { if (count($exclusions) > 0) { $conditions = [ 'NOT' => [ - 'OR' => $exclusions + 'OR' => $exclusions, ], - $foreignKeyReference + $foreignKeyReference, ]; } @@ -532,16 +533,13 @@ protected function _unlink(array $foreignKey, Table $target, array $conditions = return $ok; } - - $conditions = array_merge($conditions, $this->getConditions()); - $target->deleteAll($conditions); + $this->deleteAll($conditions); return true; } $updateFields = array_fill_keys($foreignKey, null); - $conditions = array_merge($conditions, $this->getConditions()); - $target->updateAll($updateFields, $conditions); + $this->updateAll($updateFields, $conditions); return true; } @@ -691,7 +689,7 @@ public function eagerLoader(array $options) 'strategy' => $this->getStrategy(), 'associationType' => $this->type(), 'sort' => $this->getSort(), - 'finder' => [$this, 'find'] + 'finder' => [$this, 'find'], ]); return $loader->buildEagerLoader($options); diff --git a/app/vendor/cakephp/cakephp/src/ORM/Association/HasOne.php b/app/vendor/cakephp/cakephp/src/ORM/Association/HasOne.php index 88e6b49f4..14efa63e0 100644 --- a/app/vendor/cakephp/cakephp/src/ORM/Association/HasOne.php +++ b/app/vendor/cakephp/cakephp/src/ORM/Association/HasOne.php @@ -32,11 +32,11 @@ class HasOne extends Association /** * Valid strategies for this type of association * - * @var array + * @var string[] */ protected $_validStrategies = [ self::STRATEGY_JOIN, - self::STRATEGY_SELECT + self::STRATEGY_SELECT, ]; /** @@ -96,7 +96,7 @@ public function type() * * @param \Cake\Datasource\EntityInterface $entity an entity from the source table * @param array $options options to be passed to the save method in the target table - * @return bool|\Cake\Datasource\EntityInterface false if $entity could not be saved, otherwise it returns + * @return \Cake\Datasource\EntityInterface|false False if $entity could not be saved, otherwise it returns * the saved entity * @see \Cake\ORM\Table::save() */ @@ -137,7 +137,7 @@ public function eagerLoader(array $options) 'bindingKey' => $this->getBindingKey(), 'strategy' => $this->getStrategy(), 'associationType' => $this->type(), - 'finder' => [$this, 'find'] + 'finder' => [$this, 'find'], ]); return $loader->buildEagerLoader($options); diff --git a/app/vendor/cakephp/cakephp/src/ORM/Association/Loader/SelectLoader.php b/app/vendor/cakephp/cakephp/src/ORM/Association/Loader/SelectLoader.php index 14e896370..dabcd497e 100644 --- a/app/vendor/cakephp/cakephp/src/ORM/Association/Loader/SelectLoader.php +++ b/app/vendor/cakephp/cakephp/src/ORM/Association/Loader/SelectLoader.php @@ -28,7 +28,6 @@ */ class SelectLoader { - /** * The alias of the association loading the results * @@ -139,7 +138,7 @@ protected function _defaultOptions() 'conditions' => [], 'strategy' => $this->strategy, 'nestKey' => $this->alias, - 'sort' => $this->sort + 'sort' => $this->sort, ]; } @@ -163,7 +162,7 @@ protected function _buildQuery($options) $options['fields'] = []; } - /* @var \Cake\ORM\Query $query */ + /** @var \Cake\ORM\Query $query */ $query = $finder(); if (isset($options['finder'])) { list($finderName, $opts) = $this->_extractFinder($options['finder']); diff --git a/app/vendor/cakephp/cakephp/src/ORM/Association/Loader/SelectWithPivotLoader.php b/app/vendor/cakephp/cakephp/src/ORM/Association/Loader/SelectWithPivotLoader.php index 521a2ace5..df9c81955 100644 --- a/app/vendor/cakephp/cakephp/src/ORM/Association/Loader/SelectWithPivotLoader.php +++ b/app/vendor/cakephp/cakephp/src/ORM/Association/Loader/SelectWithPivotLoader.php @@ -23,7 +23,6 @@ */ class SelectWithPivotLoader extends SelectLoader { - /** * The name of the junction association * @@ -54,7 +53,6 @@ class SelectWithPivotLoader extends SelectLoader /** * {@inheritDoc} - * */ public function __construct(array $options) { @@ -128,6 +126,14 @@ protected function _buildQuery($options) return $query; } + /** + * @inheritDoc + */ + protected function _assertFieldsPresent($fetchQuery, $key) + { + // _buildQuery() manually adds in required fields from junction table + } + /** * Generates a string used as a table field that contains the values upon * which the filter should be applied diff --git a/app/vendor/cakephp/cakephp/src/ORM/AssociationCollection.php b/app/vendor/cakephp/cakephp/src/ORM/AssociationCollection.php index a6ccca210..7ac3f7b83 100644 --- a/app/vendor/cakephp/cakephp/src/ORM/AssociationCollection.php +++ b/app/vendor/cakephp/cakephp/src/ORM/AssociationCollection.php @@ -29,7 +29,6 @@ */ class AssociationCollection implements IteratorAggregate { - use AssociationsNormalizerTrait; use LocatorAwareTrait; @@ -84,7 +83,7 @@ public function add($alias, Association $association) public function load($className, $associated, array $options = []) { $options += [ - 'tableLocator' => $this->getTableLocator() + 'tableLocator' => $this->getTableLocator(), ]; $association = new $className($associated, $options); @@ -171,7 +170,7 @@ public function type($class) /** * Get an array of associations matching a specific type. * - * @param string|array $class The type of associations you want. + * @param string|string[] $class The type of associations you want. * For example 'BelongsTo' or array like ['BelongsTo', 'HasOne'] * @return array An array of Association objects. * @since 3.5.3 diff --git a/app/vendor/cakephp/cakephp/src/ORM/AssociationsNormalizerTrait.php b/app/vendor/cakephp/cakephp/src/ORM/AssociationsNormalizerTrait.php index 335804b41..8c96e4dbc 100644 --- a/app/vendor/cakephp/cakephp/src/ORM/AssociationsNormalizerTrait.php +++ b/app/vendor/cakephp/cakephp/src/ORM/AssociationsNormalizerTrait.php @@ -20,12 +20,11 @@ */ trait AssociationsNormalizerTrait { - /** * Returns an array out of the original passed associations list where dot notation * is transformed into nested arrays so that they can be parsed by other routines * - * @param array $associations The array of included associations. + * @param array|string $associations The array of included associations. * @return array An array having dot notation transformed into nested arrays */ protected function _normalizeAssociations($associations) diff --git a/app/vendor/cakephp/cakephp/src/ORM/Behavior.php b/app/vendor/cakephp/cakephp/src/ORM/Behavior.php index fce15777b..57513505a 100644 --- a/app/vendor/cakephp/cakephp/src/ORM/Behavior.php +++ b/app/vendor/cakephp/cakephp/src/ORM/Behavior.php @@ -112,7 +112,6 @@ */ class Behavior implements EventListenerInterface { - use InstanceConfigTrait; /** @@ -261,6 +260,7 @@ public function implementedEvents() { $eventMap = [ 'Model.beforeMarshal' => 'beforeMarshal', + 'Model.afterMarshal' => 'afterMarshal', 'Model.beforeFind' => 'beforeFind', 'Model.beforeSave' => 'beforeSave', 'Model.afterSave' => 'afterSave', @@ -286,7 +286,7 @@ public function implementedEvents() } else { $events[$event] = [ 'callable' => $method, - 'priority' => $priority + 'priority' => $priority, ]; } } @@ -306,8 +306,8 @@ public function implementedEvents() * ] * ``` * - * With the above example, a call to `$Table->find('this')` will call `$Behavior->findThis()` - * and a call to `$Table->find('alias')` will call `$Behavior->findMethodName()` + * With the above example, a call to `$table->find('this')` will call `$behavior->findThis()` + * and a call to `$table->find('alias')` will call `$behavior->findMethodName()` * * It is recommended, though not required, to define implementedFinders in the config property * of child classes such that it is not necessary to use reflections to derive the available @@ -379,14 +379,14 @@ protected function _reflectionCache() $eventMethods = []; foreach ($events as $e => $binding) { if (is_array($binding) && isset($binding['callable'])) { - /* @var string $callable */ + /** @var string $callable */ $callable = $binding['callable']; $binding = $callable; } $eventMethods[$binding] = true; } - $baseClass = 'Cake\ORM\Behavior'; + $baseClass = self::class; if (isset(self::$_reflectionCache[$baseClass])) { $baseMethods = self::$_reflectionCache[$baseClass]; } else { @@ -396,14 +396,15 @@ protected function _reflectionCache() $return = [ 'finders' => [], - 'methods' => [] + 'methods' => [], ]; $reflection = new ReflectionClass($class); foreach ($reflection->getMethods(ReflectionMethod::IS_PUBLIC) as $method) { $methodName = $method->getName(); - if (in_array($methodName, $baseMethods, true) || + if ( + in_array($methodName, $baseMethods, true) || isset($eventMethods[$methodName]) ) { continue; diff --git a/app/vendor/cakephp/cakephp/src/ORM/Behavior/CounterCacheBehavior.php b/app/vendor/cakephp/cakephp/src/ORM/Behavior/CounterCacheBehavior.php index b89a42d37..f9b63de3e 100644 --- a/app/vendor/cakephp/cakephp/src/ORM/Behavior/CounterCacheBehavior.php +++ b/app/vendor/cakephp/cakephp/src/ORM/Behavior/CounterCacheBehavior.php @@ -100,7 +100,6 @@ */ class CounterCacheBehavior extends Behavior { - /** * Store the fields which should be ignored * @@ -134,7 +133,8 @@ public function beforeSave(Event $event, EntityInterface $entity, $options) $registryAlias = $assoc->getTarget()->getRegistryAlias(); $entityAlias = $assoc->getProperty(); - if (!is_callable($config) && + if ( + !is_callable($config) && isset($config['ignoreDirty']) && $config['ignoreDirty'] === true && $entity->$entityAlias->isDirty($field) @@ -227,7 +227,8 @@ protected function _processAssociation(Event $event, EntityInterface $entity, As $config = []; } - if (isset($this->_ignoreDirty[$assoc->getTarget()->getRegistryAlias()][$field]) && + if ( + isset($this->_ignoreDirty[$assoc->getTarget()->getRegistryAlias()][$field]) && $this->_ignoreDirty[$assoc->getTarget()->getRegistryAlias()][$field] === true ) { continue; diff --git a/app/vendor/cakephp/cakephp/src/ORM/Behavior/TimestampBehavior.php b/app/vendor/cakephp/cakephp/src/ORM/Behavior/TimestampBehavior.php index 6d2d54fec..71a8e8bd2 100644 --- a/app/vendor/cakephp/cakephp/src/ORM/Behavior/TimestampBehavior.php +++ b/app/vendor/cakephp/cakephp/src/ORM/Behavior/TimestampBehavior.php @@ -27,7 +27,6 @@ */ class TimestampBehavior extends Behavior { - /** * Default config * @@ -47,15 +46,15 @@ class TimestampBehavior extends Behavior 'implementedFinders' => [], 'implementedMethods' => [ 'timestamp' => 'timestamp', - 'touch' => 'touch' + 'touch' => 'touch', ], 'events' => [ 'Model.beforeSave' => [ 'created' => 'new', - 'modified' => 'always' - ] + 'modified' => 'always', + ], ], - 'refreshTimestamp' => true + 'refreshTimestamp' => true, ]; /** @@ -87,7 +86,7 @@ public function initialize(array $config) * @param \Cake\Event\Event $event Event instance. * @param \Cake\Datasource\EntityInterface $entity Entity instance. * @throws \UnexpectedValueException if a field's when value is misdefined - * @return bool Returns true irrespective of the behavior logic, the save will not be prevented. + * @return true Returns true irrespective of the behavior logic, the save will not be prevented. * @throws \UnexpectedValueException When the value for an event is not 'always', 'new' or 'existing' */ public function handleEvent(Event $event, EntityInterface $entity) @@ -104,7 +103,8 @@ public function handleEvent(Event $event, EntityInterface $entity) sprintf('When should be one of "always", "new" or "existing". The passed value "%s" is invalid', $when) ); } - if ($when === 'always' || + if ( + $when === 'always' || ($when === 'new' && $new) || ($when === 'existing' && !$new) ) { @@ -174,7 +174,7 @@ public function touch(EntityInterface $entity, $eventName = 'Model.beforeSave') $refresh = $this->_config['refreshTimestamp']; foreach ($events[$eventName] as $field => $when) { - if (in_array($when, ['always', 'existing'])) { + if (in_array($when, ['always', 'existing'], true)) { $return = true; $entity->setDirty($field, false); $this->_updateField($entity, $field, $refresh); diff --git a/app/vendor/cakephp/cakephp/src/ORM/Behavior/Translate/TranslateTrait.php b/app/vendor/cakephp/cakephp/src/ORM/Behavior/Translate/TranslateTrait.php index 343740e23..9ce6126e0 100644 --- a/app/vendor/cakephp/cakephp/src/ORM/Behavior/Translate/TranslateTrait.php +++ b/app/vendor/cakephp/cakephp/src/ORM/Behavior/Translate/TranslateTrait.php @@ -22,7 +22,6 @@ */ trait TranslateTrait { - /** * Returns the entity containing the translated fields for this object and for * the specified language. If the translation for the passed language is not diff --git a/app/vendor/cakephp/cakephp/src/ORM/Behavior/TranslateBehavior.php b/app/vendor/cakephp/cakephp/src/ORM/Behavior/TranslateBehavior.php index 9d3219ad2..c44083793 100644 --- a/app/vendor/cakephp/cakephp/src/ORM/Behavior/TranslateBehavior.php +++ b/app/vendor/cakephp/cakephp/src/ORM/Behavior/TranslateBehavior.php @@ -42,7 +42,6 @@ */ class TranslateBehavior extends Behavior implements PropertyMarshalInterface { - use LocatorAwareTrait; /** @@ -80,7 +79,7 @@ class TranslateBehavior extends Behavior implements PropertyMarshalInterface 'setLocale' => 'setLocale', 'getLocale' => 'getLocale', 'locale' => 'locale', - 'translationField' => 'translationField' + 'translationField' => 'translationField', ], 'fields' => [], 'translationTable' => 'I18n', @@ -90,7 +89,7 @@ class TranslateBehavior extends Behavior implements PropertyMarshalInterface 'onlyTranslated' => false, 'strategy' => 'subquery', 'tableLocator' => null, - 'validator' => false + 'validator' => false, ]; /** @@ -103,7 +102,7 @@ public function __construct(Table $table, array $config = []) { $config += [ 'defaultLocale' => I18n::getDefaultLocale(), - 'referenceName' => $this->_referenceName($table) + 'referenceName' => $this->_referenceName($table), ]; if (isset($config['tableLocator'])) { @@ -144,7 +143,6 @@ public function initialize(array $config) * @param string $table the table name to use for storing each field translation * @param string $model the model field value * @param string $strategy the strategy used in the _i18n association - * * @return void */ public function setupFieldAssociations($fields, $table, $model, $strategy) @@ -161,7 +159,7 @@ public function setupFieldAssociations($fields, $table, $model, $strategy) $fieldTable = $tableLocator->get($name, [ 'className' => $table, 'alias' => $name, - 'table' => $this->_translationTable->getTable() + 'table' => $this->_translationTable->getTable(), ]); } else { $fieldTable = $tableLocator->get($name); @@ -180,7 +178,7 @@ public function setupFieldAssociations($fields, $table, $model, $strategy) 'foreignKey' => 'foreign_key', 'joinType' => $filter ? QueryInterface::JOIN_TYPE_INNER : QueryInterface::JOIN_TYPE_LEFT, 'conditions' => $conditions, - 'propertyName' => $field . '_translation' + 'propertyName' => $field . '_translation', ]); } @@ -195,7 +193,7 @@ public function setupFieldAssociations($fields, $table, $model, $strategy) 'strategy' => $strategy, 'conditions' => $conditions, 'propertyName' => '_i18n', - 'dependent' => true + 'dependent' => true, ]); } @@ -219,11 +217,12 @@ public function beforeFind(Event $event, Query $query, $options) $conditions = function ($field, $locale, $query, $select) { return function ($q) use ($field, $locale, $query, $select) { - /* @var \Cake\Datasource\QueryInterface $q */ + /** @var \Cake\Datasource\QueryInterface $q */ $q->where([$q->getRepository()->aliasField('locale') => $locale]); - /* @var \Cake\ORM\Query $query */ - if ($query->isAutoFieldsEnabled() || + /** @var \Cake\ORM\Query $query */ + if ( + $query->isAutoFieldsEnabled() || in_array($field, $select, true) || in_array($this->_table->aliasField($field), $select, true) ) { @@ -332,7 +331,7 @@ public function beforeSave(Event $event, EntityInterface $entity, ArrayObject $o 'field IN' => $fields, 'locale' => $locale, 'foreign_key' => $key, - 'model' => $model + 'model' => $model, ]) ->disableBufferedResults() ->all() @@ -348,7 +347,7 @@ public function beforeSave(Event $event, EntityInterface $entity, ArrayObject $o foreach ($new as $field => $content) { $new[$field] = new Entity(compact('locale', 'field', 'content', 'model'), [ 'useSetters' => false, - 'markNew' => true + 'markNew' => true, ]); } @@ -374,11 +373,11 @@ public function afterSave(Event $event, EntityInterface $entity) } /** + * {@inheritDoc} + * * Add in `_translations` marshalling handlers. You can disable marshalling * of translations by setting `'translations' => false` in the options * provided to `Table::newEntity()` or `Table::patchEntity()`. - * - * {@inheritDoc} */ public function buildMarshalMap($marshaller, $map, $options) { @@ -388,7 +387,7 @@ public function buildMarshalMap($marshaller, $map, $options) return [ '_translations' => function ($value, $entity) use ($marshaller, $options) { - /* @var \Cake\Datasource\EntityInterface $entity */ + /** @var \Cake\Datasource\EntityInterface $entity */ $translations = $entity->get('_translations'); foreach ($this->_config['fields'] as $field) { $options['validate'] = $this->_config['validator']; @@ -411,7 +410,7 @@ public function buildMarshalMap($marshaller, $map, $options) } return $translations; - } + }, ]; } @@ -432,8 +431,8 @@ public function buildMarshalMap($marshaller, $map, $options) * globally configured locale. * @return $this * @see \Cake\ORM\Behavior\TranslateBehavior::getLocale() - * @link https://book.cakephp.org/3.0/en/orm/behaviors/translate.html#retrieving-one-language-without-using-i18n-locale - * @link https://book.cakephp.org/3.0/en/orm/behaviors/translate.html#saving-in-another-language + * @link https://book.cakephp.org/3/en/orm/behaviors/translate.html#retrieving-one-language-without-using-i18n-locale + * @link https://book.cakephp.org/3/en/orm/behaviors/translate.html#saving-in-another-language */ public function setLocale($locale) { @@ -535,7 +534,7 @@ public function findTranslations(Query $query, array $options) return $query ->contain([$targetAlias => function ($query) use ($locales, $targetAlias) { if ($locales) { - /* @var \Cake\Datasource\QueryInterface $query */ + /** @var \Cake\Datasource\QueryInterface $query */ $query->where(["$targetAlias.locale IN" => $locales]); } @@ -602,7 +601,7 @@ protected function _rowMapper($results, $locale) $row['_locale'] = $locale; if ($hydrated) { - /* @var \Cake\Datasource\EntityInterface $row */ + /** @var \Cake\Datasource\EntityInterface $row */ $row->clean(); } @@ -635,7 +634,7 @@ public function groupTranslations($results) $translation = new $entityClass($keys + ['locale' => $locale], [ 'markNew' => false, 'useSetters' => false, - 'markClean' => true + 'markClean' => true, ]); $result[$locale] = $translation; } @@ -678,7 +677,7 @@ protected function _bundleTranslatedFields($entity) } $find[] = ['locale' => $lang, 'field' => $field, 'foreign_key' => $key]; $contents[] = new Entity(['content' => $translation->get($field)], [ - 'useSetters' => false + 'useSetters' => false, ]); } } diff --git a/app/vendor/cakephp/cakephp/src/ORM/Behavior/TreeBehavior.php b/app/vendor/cakephp/cakephp/src/ORM/Behavior/TreeBehavior.php index 44b32daac..d37d0a227 100644 --- a/app/vendor/cakephp/cakephp/src/ORM/Behavior/TreeBehavior.php +++ b/app/vendor/cakephp/cakephp/src/ORM/Behavior/TreeBehavior.php @@ -37,7 +37,6 @@ */ class TreeBehavior extends Behavior { - /** * Cached copy of the first column in a table's primary key. * @@ -195,7 +194,7 @@ protected function _setChildrenLevel($entity) 'order' => $config['left'], ]); - /* @var \Cake\Datasource\EntityInterface $node */ + /** @var \Cake\Datasource\EntityInterface $node */ foreach ($children as $node) { $parentIdValue = $node->get($config['parent']); $depth = $depths[$parentIdValue] + 1; @@ -227,7 +226,7 @@ public function beforeDelete(Event $event, EntityInterface $entity) $query = $this->_scope($this->_table->query()) ->delete() ->where(function ($exp) use ($config, $left, $right) { - /* @var \Cake\Database\Expression\QueryExpression $exp */ + /** @var \Cake\Database\Expression\QueryExpression $exp */ return $exp ->gte($config['leftField'], $left + 1) ->lte($config['leftField'], $right - 1); @@ -347,7 +346,7 @@ protected function _unmarkInternalTree() $config = $this->getConfig(); $this->_table->updateAll( function ($exp) use ($config) { - /* @var \Cake\Database\Expression\QueryExpression $exp */ + /** @var \Cake\Database\Expression\QueryExpression $exp */ $leftInverse = clone $exp; $leftInverse->setConjunction('*')->add('-1'); $rightInverse = clone $leftInverse; @@ -357,7 +356,7 @@ function ($exp) use ($config) { ->eq($config['rightField'], $rightInverse->add($config['rightField'])); }, function ($exp) use ($config) { - /* @var \Cake\Database\Expression\QueryExpression $exp */ + /** @var \Cake\Database\Expression\QueryExpression $exp */ return $exp->lt($config['leftField'], 0); } ); @@ -521,7 +520,7 @@ public function findTreeList(Query $query, array $options) public function formatTreeList(Query $query, array $options = []) { return $query->formatResults(function ($results) use ($options) { - /* @var \Cake\Collection\CollectionTrait $results */ + /** @var \Cake\Collection\CollectionTrait $results */ $options += [ 'keyPath' => $this->_getPrimaryKey(), 'valuePath' => $this->_table->getDisplayField(), @@ -604,7 +603,7 @@ protected function _removeFromTree($node) * @param \Cake\Datasource\EntityInterface $node The node to move * @param int|bool $number How many places to move the node, or true to move to first position * @throws \Cake\Datasource\Exception\RecordNotFoundException When node was not found - * @return \Cake\Datasource\EntityInterface|bool $node The node after being moved or false on failure + * @return \Cake\Datasource\EntityInterface|false $node The node after being moved or false on failure */ public function moveUp(EntityInterface $node, $number = 1) { @@ -625,7 +624,7 @@ public function moveUp(EntityInterface $node, $number = 1) * @param \Cake\Datasource\EntityInterface $node The node to move * @param int|bool $number How many places to move the node, or true to move to first position * @throws \Cake\Datasource\Exception\RecordNotFoundException When node was not found - * @return \Cake\Datasource\EntityInterface|bool $node The node after being moved or false on failure + * @return \Cake\Datasource\EntityInterface|false $node The node after being moved or false on failure */ protected function _moveUp($node, $number) { @@ -639,7 +638,7 @@ protected function _moveUp($node, $number) ->select([$left, $right]) ->where(["$parent IS" => $nodeParent]) ->where(function ($exp) use ($config, $nodeLeft) { - /* @var \Cake\Database\Expression\QueryExpression $exp */ + /** @var \Cake\Database\Expression\QueryExpression $exp */ return $exp->lt($config['rightField'], $nodeLeft); }) ->orderDesc($config['leftField']) @@ -652,7 +651,7 @@ protected function _moveUp($node, $number) ->select([$left, $right]) ->where(["$parent IS" => $nodeParent]) ->where(function ($exp) use ($config, $nodeLeft) { - /* @var \Cake\Database\Expression\QueryExpression $exp */ + /** @var \Cake\Database\Expression\QueryExpression $exp */ return $exp->lt($config['rightField'], $nodeLeft); }) ->orderAsc($config['leftField']) @@ -694,7 +693,7 @@ protected function _moveUp($node, $number) * @param \Cake\Datasource\EntityInterface $node The node to move * @param int|bool $number How many places to move the node or true to move to last position * @throws \Cake\Datasource\Exception\RecordNotFoundException When node was not found - * @return \Cake\Datasource\EntityInterface|bool the entity after being moved or false on failure + * @return \Cake\Datasource\EntityInterface|false the entity after being moved or false on failure */ public function moveDown(EntityInterface $node, $number = 1) { @@ -715,7 +714,7 @@ public function moveDown(EntityInterface $node, $number = 1) * @param \Cake\Datasource\EntityInterface $node The node to move * @param int|bool $number How many places to move the node, or true to move to last position * @throws \Cake\Datasource\Exception\RecordNotFoundException When node was not found - * @return \Cake\Datasource\EntityInterface|bool $node The node after being moved or false on failure + * @return \Cake\Datasource\EntityInterface|false $node The node after being moved or false on failure */ protected function _moveDown($node, $number) { @@ -729,7 +728,7 @@ protected function _moveDown($node, $number) ->select([$left, $right]) ->where(["$parent IS" => $nodeParent]) ->where(function ($exp) use ($config, $nodeRight) { - /* @var \Cake\Database\Expression\QueryExpression $exp */ + /** @var \Cake\Database\Expression\QueryExpression $exp */ return $exp->gt($config['leftField'], $nodeRight); }) ->orderAsc($config['leftField']) @@ -742,7 +741,7 @@ protected function _moveDown($node, $number) ->select([$left, $right]) ->where(["$parent IS" => $nodeParent]) ->where(function ($exp) use ($config, $nodeRight) { - /* @var \Cake\Database\Expression\QueryExpression $exp */ + /** @var \Cake\Database\Expression\QueryExpression $exp */ return $exp->gt($config['leftField'], $nodeRight); }) ->orderDesc($config['leftField']) @@ -820,47 +819,41 @@ public function recover() /** * Recursive method used to recover a single level of the tree * - * @param int $counter The Last left column value that was assigned + * @param int $lftRght The starting lft/rght value * @param mixed $parentId the parent id of the level to be recovered * @param int $level Node level - * @return int The next value to use for the left column + * @return int The next lftRght value */ - protected function _recoverTree($counter = 0, $parentId = null, $level = -1) + protected function _recoverTree($lftRght = 1, $parentId = null, $level = 0) { $config = $this->getConfig(); list($parent, $left, $right) = [$config['parent'], $config['left'], $config['right']]; $primaryKey = $this->_getPrimaryKey(); - $aliasedPrimaryKey = $this->_table->aliasField($primaryKey); - $order = $config['recoverOrder'] ?: $aliasedPrimaryKey; + $order = $config['recoverOrder'] ?: $primaryKey; - $query = $this->_scope($this->_table->query()) - ->select([$aliasedPrimaryKey]) - ->where([$this->_table->aliasField($parent) . ' IS' => $parentId]) + $nodes = $this->_scope($this->_table->query()) + ->select($primaryKey) + ->where([$parent . ' IS' => $parentId]) ->order($order) - ->disableHydration(); + ->disableHydration() + ->all(); - $leftCounter = $counter; - $nextLevel = $level + 1; - foreach ($query as $row) { - $counter++; - $counter = $this->_recoverTree($counter, $row[$primaryKey], $nextLevel); - } + foreach ($nodes as $node) { + $nodeLft = $lftRght++; + $lftRght = $this->_recoverTree($lftRght, $node[$primaryKey], $level + 1); - if ($parentId === null) { - return $counter; - } + $fields = [$left => $nodeLft, $right => $lftRght++]; + if ($config['level']) { + $fields[$config['level']] = $level; + } - $fields = [$left => $leftCounter, $right => $counter + 1]; - if ($config['level']) { - $fields[$config['level']] = $level; + $this->_table->updateAll( + $fields, + [$primaryKey => $node[$primaryKey]] + ); } - $this->_table->updateAll( - $fields, - [$primaryKey => $parentId] - ); - - return $counter + 1; + return $lftRght; } /** @@ -877,7 +870,7 @@ protected function _getMax() ->orderDesc($rightField) ->first(); - if (empty($edge->{$field})) { + if ($edge === null || empty($edge[$field])) { return 0; } @@ -987,7 +980,7 @@ protected function _getPrimaryKey() * Returns the depth level of a node in the tree. * * @param int|string|\Cake\Datasource\EntityInterface $entity The entity or primary key get the level of. - * @return int|bool Integer of the level or false if the node does not exist. + * @return int|false Integer of the level or false if the node does not exist. */ public function getLevel($entity) { diff --git a/app/vendor/cakephp/cakephp/src/ORM/BehaviorRegistry.php b/app/vendor/cakephp/cakephp/src/ORM/BehaviorRegistry.php index a72389e6e..d5c7f84d0 100644 --- a/app/vendor/cakephp/cakephp/src/ORM/BehaviorRegistry.php +++ b/app/vendor/cakephp/cakephp/src/ORM/BehaviorRegistry.php @@ -27,10 +27,11 @@ * and constructing behavior objects. * * This class also provides method for checking and dispatching behavior methods. + * + * @extends \Cake\Core\ObjectRegistry<\Cake\ORM\Behavior> */ class BehaviorRegistry extends ObjectRegistry implements EventDispatcherInterface { - use EventDispatcherTrait; /** @@ -118,7 +119,7 @@ protected function _resolveClassName($class) * and Cake\Core\ObjectRegistry::unload() * * @param string $class The classname that is missing. - * @param string $plugin The plugin the behavior is missing in. + * @param string|null $plugin The plugin the behavior is missing in. * @return void * @throws \Cake\ORM\Exception\MissingBehaviorException */ @@ -126,7 +127,7 @@ protected function _throwMissingClassError($class, $plugin) { throw new MissingBehaviorException([ 'class' => $class . 'Behavior', - 'plugin' => $plugin + 'plugin' => $plugin, ]); } diff --git a/app/vendor/cakephp/cakephp/src/ORM/EagerLoadable.php b/app/vendor/cakephp/cakephp/src/ORM/EagerLoadable.php index 9d93f5b1b..b01e6809e 100644 --- a/app/vendor/cakephp/cakephp/src/ORM/EagerLoadable.php +++ b/app/vendor/cakephp/cakephp/src/ORM/EagerLoadable.php @@ -24,7 +24,6 @@ */ class EagerLoadable { - /** * The name of the association to load. * @@ -132,7 +131,7 @@ public function __construct($name, array $config = []) $this->_name = $name; $allowed = [ 'associations', 'instance', 'config', 'canBeJoined', - 'aliasPath', 'propertyPath', 'forMatching', 'targetProperty' + 'aliasPath', 'propertyPath', 'forMatching', 'targetProperty', ]; foreach ($allowed as $property) { if (isset($config[$property])) { @@ -337,8 +336,8 @@ public function asContainArray() return [ $this->_name => [ 'associations' => $associations, - 'config' => $config - ] + 'config' => $config, + ], ]; } } diff --git a/app/vendor/cakephp/cakephp/src/ORM/EagerLoader.php b/app/vendor/cakephp/cakephp/src/ORM/EagerLoader.php index 83f0d4bf7..55eb4a08f 100644 --- a/app/vendor/cakephp/cakephp/src/ORM/EagerLoader.php +++ b/app/vendor/cakephp/cakephp/src/ORM/EagerLoader.php @@ -28,7 +28,6 @@ */ class EagerLoader { - /** * Nested array describing the association to be fetched * and the options to apply for each of them, if any @@ -62,7 +61,7 @@ class EagerLoader 'finder' => 1, 'joinType' => 1, 'strategy' => 1, - 'negateMatch' => 1 + 'negateMatch' => 1, ]; /** @@ -153,8 +152,8 @@ public function contain($associations = [], callable $queryBuilder = null) $associations = [ $associations => [ - 'queryBuilder' => $queryBuilder - ] + 'queryBuilder' => $queryBuilder, + ], ]; } @@ -558,8 +557,9 @@ protected function _normalizeContain(Table $parent, $alias, $options, $paths) $paths += ['aliasPath' => '', 'propertyPath' => '', 'root' => $alias]; $paths['aliasPath'] .= '.' . $alias; - if (isset($options['matching']) && - $options['matching'] === true + if ( + isset($options['matching']) && + $options['matching'] === true ) { $paths['propertyPath'] = '_matchingData.' . $alias; } else { @@ -575,7 +575,7 @@ protected function _normalizeContain(Table $parent, $alias, $options, $paths) 'config' => array_diff_key($options, $extra), 'aliasPath' => trim($paths['aliasPath'], '.'), 'propertyPath' => trim($paths['propertyPath'], '.'), - 'targetProperty' => $instance->getProperty() + 'targetProperty' => $instance->getProperty(), ]; $config['canBeJoined'] = $instance->canBeJoined($config['config']); $eagerLoadable = new EagerLoadable($alias, $config); @@ -612,7 +612,7 @@ protected function _fixStrategies() if (count($configs) < 2) { continue; } - /* @var \Cake\ORM\EagerLoadable $loadable */ + /** @var \Cake\ORM\EagerLoadable $loadable */ foreach ($configs as $loadable) { if (strpos($loadable->aliasPath(), '.')) { $this->_correctStrategy($loadable); @@ -716,7 +716,7 @@ public function loadExternal($query, $statement) 'query' => $query, 'contain' => $contain, 'keys' => $keys, - 'nestKey' => $meta->aliasPath() + 'nestKey' => $meta->aliasPath(), ] ); $statement = new CallbackStatement($statement, $driver, $f); @@ -766,7 +766,7 @@ public function associationsMap($table) */ protected function _buildAssociationsMap($map, $level, $matching = false) { - /* @var \Cake\ORM\EagerLoadable $meta */ + /** @var \Cake\ORM\EagerLoadable $meta */ foreach ($level as $assoc => $meta) { $canBeJoined = $meta->canBeJoined(); $instance = $meta->instance(); @@ -779,7 +779,7 @@ protected function _buildAssociationsMap($map, $level, $matching = false) 'entityClass' => $instance->getTarget()->getEntityClass(), 'nestKey' => $canBeJoined ? $assoc : $meta->aliasPath(), 'matching' => $forMatching !== null ? $forMatching : $matching, - 'targetProperty' => $meta->targetProperty() + 'targetProperty' => $meta->targetProperty(), ]; if ($canBeJoined && $associations) { $map = $this->_buildAssociationsMap($map, $associations, $matching); @@ -810,7 +810,7 @@ public function addToJoinsMap($alias, Association $assoc, $asMatching = false, $ 'instance' => $assoc, 'canBeJoined' => true, 'forMatching' => $asMatching, - 'targetProperty' => $targetProperty ?: $assoc->getProperty() + 'targetProperty' => $targetProperty ?: $assoc->getProperty(), ]); } @@ -826,7 +826,7 @@ public function addToJoinsMap($alias, Association $assoc, $asMatching = false, $ protected function _collectKeys($external, $query, $statement) { $collectKeys = []; - /* @var \Cake\ORM\EagerLoadable $meta */ + /** @var \Cake\ORM\EagerLoadable $meta */ foreach ($external as $meta) { $instance = $meta->instance(); if (!$instance->requiresKeys($meta->getConfig())) { diff --git a/app/vendor/cakephp/cakephp/src/ORM/Entity.php b/app/vendor/cakephp/cakephp/src/ORM/Entity.php index a3771491e..980273a1d 100644 --- a/app/vendor/cakephp/cakephp/src/ORM/Entity.php +++ b/app/vendor/cakephp/cakephp/src/ORM/Entity.php @@ -52,7 +52,7 @@ public function __construct(array $properties = [], array $options = []) 'markClean' => false, 'markNew' => null, 'guard' => false, - 'source' => null + 'source' => null, ]; if (!empty($options['source'])) { @@ -60,7 +60,7 @@ public function __construct(array $properties = [], array $options = []) } if ($options['markNew'] !== null) { - $this->isNew($options['markNew']); + $this->setNew($options['markNew']); } if (!empty($properties) && $options['markClean'] && !$options['useSetters']) { @@ -72,7 +72,7 @@ public function __construct(array $properties = [], array $options = []) if (!empty($properties)) { $this->set($properties, [ 'setter' => $options['useSetters'], - 'guard' => $options['guard'] + 'guard' => $options['guard'], ]); } diff --git a/app/vendor/cakephp/cakephp/src/ORM/Exception/MissingBehaviorException.php b/app/vendor/cakephp/cakephp/src/ORM/Exception/MissingBehaviorException.php index 725e5e8ac..3925742a3 100644 --- a/app/vendor/cakephp/cakephp/src/ORM/Exception/MissingBehaviorException.php +++ b/app/vendor/cakephp/cakephp/src/ORM/Exception/MissingBehaviorException.php @@ -19,6 +19,8 @@ */ class MissingBehaviorException extends Exception { - + /** + * @inheritDoc + */ protected $_messageTemplate = 'Behavior class %s could not be found.'; } diff --git a/app/vendor/cakephp/cakephp/src/ORM/Exception/MissingEntityException.php b/app/vendor/cakephp/cakephp/src/ORM/Exception/MissingEntityException.php index 6f3552799..14dd8281d 100644 --- a/app/vendor/cakephp/cakephp/src/ORM/Exception/MissingEntityException.php +++ b/app/vendor/cakephp/cakephp/src/ORM/Exception/MissingEntityException.php @@ -23,6 +23,8 @@ */ class MissingEntityException extends Exception { - + /** + * @inheritDoc + */ protected $_messageTemplate = 'Entity class %s could not be found.'; } diff --git a/app/vendor/cakephp/cakephp/src/ORM/Exception/MissingTableClassException.php b/app/vendor/cakephp/cakephp/src/ORM/Exception/MissingTableClassException.php index 544a968d9..890653cd5 100644 --- a/app/vendor/cakephp/cakephp/src/ORM/Exception/MissingTableClassException.php +++ b/app/vendor/cakephp/cakephp/src/ORM/Exception/MissingTableClassException.php @@ -21,6 +21,8 @@ */ class MissingTableClassException extends Exception { - + /** + * @inheritDoc + */ protected $_messageTemplate = 'Table class %s could not be found.'; } diff --git a/app/vendor/cakephp/cakephp/src/ORM/Exception/PersistenceFailedException.php b/app/vendor/cakephp/cakephp/src/ORM/Exception/PersistenceFailedException.php index 8596f1e98..4673cb325 100644 --- a/app/vendor/cakephp/cakephp/src/ORM/Exception/PersistenceFailedException.php +++ b/app/vendor/cakephp/cakephp/src/ORM/Exception/PersistenceFailedException.php @@ -21,7 +21,6 @@ */ class PersistenceFailedException extends Exception { - /** * The entity on which the persistence operation failed * diff --git a/app/vendor/cakephp/cakephp/src/ORM/Exception/RolledbackTransactionException.php b/app/vendor/cakephp/cakephp/src/ORM/Exception/RolledbackTransactionException.php index ac31a9d0f..dd15821ea 100644 --- a/app/vendor/cakephp/cakephp/src/ORM/Exception/RolledbackTransactionException.php +++ b/app/vendor/cakephp/cakephp/src/ORM/Exception/RolledbackTransactionException.php @@ -19,6 +19,8 @@ */ class RolledbackTransactionException extends Exception { - + /** + * @inheritDoc + */ protected $_messageTemplate = 'The afterSave event in "%s" is aborting the transaction before the save process is done.'; } diff --git a/app/vendor/cakephp/cakephp/src/ORM/LazyEagerLoader.php b/app/vendor/cakephp/cakephp/src/ORM/LazyEagerLoader.php index 0fedcffcc..a4e8cfce4 100644 --- a/app/vendor/cakephp/cakephp/src/ORM/LazyEagerLoader.php +++ b/app/vendor/cakephp/cakephp/src/ORM/LazyEagerLoader.php @@ -26,7 +26,6 @@ */ class LazyEagerLoader { - /** * Loads the specified associations in the passed entity or list of entities * by executing extra queries in the database and merging the results in the diff --git a/app/vendor/cakephp/cakephp/src/ORM/Locator/LocatorAwareTrait.php b/app/vendor/cakephp/cakephp/src/ORM/Locator/LocatorAwareTrait.php index 2d26e5199..53e09ae7b 100644 --- a/app/vendor/cakephp/cakephp/src/ORM/Locator/LocatorAwareTrait.php +++ b/app/vendor/cakephp/cakephp/src/ORM/Locator/LocatorAwareTrait.php @@ -21,7 +21,6 @@ */ trait LocatorAwareTrait { - /** * Table locator instance * @@ -70,7 +69,7 @@ public function setTableLocator(LocatorInterface $tableLocator) */ public function getTableLocator() { - if (!$this->_tableLocator) { + if ($this->_tableLocator === null) { $this->_tableLocator = TableRegistry::getTableLocator(); } diff --git a/app/vendor/cakephp/cakephp/src/ORM/Locator/LocatorInterface.php b/app/vendor/cakephp/cakephp/src/ORM/Locator/LocatorInterface.php index 08cddd6a2..3bd075891 100644 --- a/app/vendor/cakephp/cakephp/src/ORM/Locator/LocatorInterface.php +++ b/app/vendor/cakephp/cakephp/src/ORM/Locator/LocatorInterface.php @@ -24,7 +24,6 @@ */ interface LocatorInterface { - /** * Stores a list of options to be used when instantiating an object * with a matching alias. diff --git a/app/vendor/cakephp/cakephp/src/ORM/Locator/TableLocator.php b/app/vendor/cakephp/cakephp/src/ORM/Locator/TableLocator.php index 215d1f6e9..cb3ed7b93 100644 --- a/app/vendor/cakephp/cakephp/src/ORM/Locator/TableLocator.php +++ b/app/vendor/cakephp/cakephp/src/ORM/Locator/TableLocator.php @@ -26,7 +26,6 @@ */ class TableLocator implements LocatorInterface { - /** * Contains a list of locations where table classes should be looked for. * @@ -235,7 +234,7 @@ public function get($alias, array $options = []) if (!empty($options['connectionName'])) { $connectionName = $options['connectionName']; } else { - /* @var \Cake\ORM\Table $className */ + /** @var \Cake\ORM\Table $className */ $className = $options['className']; $connectionName = $className::defaultConnectionName(); } @@ -318,6 +317,7 @@ public function clear() $this->_instances = []; $this->_config = []; $this->_fallbacked = []; + $this->_options = []; } /** @@ -350,7 +350,6 @@ public function remove($alias) * * @param string $location Location to add. * @return $this - * * @since 3.8.0 */ public function addLocation($location) diff --git a/app/vendor/cakephp/cakephp/src/ORM/Marshaller.php b/app/vendor/cakephp/cakephp/src/ORM/Marshaller.php index a54160d86..f3c4dbf20 100644 --- a/app/vendor/cakephp/cakephp/src/ORM/Marshaller.php +++ b/app/vendor/cakephp/cakephp/src/ORM/Marshaller.php @@ -35,7 +35,6 @@ */ class Marshaller { - use AssociationsNormalizerTrait; /** @@ -159,6 +158,14 @@ protected function _buildPropertyMap($data, $options) * ]); * ``` * + * ``` + * $result = $marshaller->one($data, [ + * 'associated' => [ + * 'Tags' => ['accessibleFields' => ['*' => true]] + * ] + * ]); + * ``` + * * @param array $data The data to hydrate. * @param array $options List of options * @return \Cake\Datasource\EntityInterface @@ -223,6 +230,7 @@ public function one(array $data, array $options = []) } $entity->setErrors($errors); + $this->dispatchAfterMarshal($entity, $data, $options); return $entity; } @@ -258,7 +266,7 @@ protected function _validate($data, $options, $isNew) ); } - return $validator->errors($data, $isNew); + return $validator->validate($data, $isNew); } /** @@ -309,10 +317,11 @@ protected function _marshalAssociation($assoc, $value, $options) $targetTable = $assoc->getTarget(); $marshaller = $targetTable->marshaller(); $types = [Association::ONE_TO_ONE, Association::MANY_TO_ONE]; - if (in_array($assoc->type(), $types, true)) { + $type = $assoc->type(); + if (in_array($type, $types, true)) { return $marshaller->one($value, (array)$options); } - if ($assoc->type() === Association::ONE_TO_MANY || $assoc->type() === Association::MANY_TO_MANY) { + if ($type === Association::ONE_TO_MANY || $type === Association::MANY_TO_MANY) { $hasIds = array_key_exists('_ids', $value); $onlyIds = array_key_exists('onlyIds', $options) && $options['onlyIds']; @@ -323,7 +332,7 @@ protected function _marshalAssociation($assoc, $value, $options) return []; } } - if ($assoc->type() === Association::MANY_TO_MANY) { + if ($type === Association::MANY_TO_MANY) { return $marshaller->_belongsToMany($assoc, $value, (array)$options); } @@ -419,7 +428,7 @@ protected function _belongsToMany(BelongsToMany $assoc, array $data, $options = $query = $target->find(); $query->andWhere(function ($exp) use ($conditions) { /** @var \Cake\Database\Expression\QueryExpression $exp */ - return $exp->or_($conditions); + return $exp->or($conditions); }); $keyFields = array_keys($primaryKey); @@ -487,7 +496,12 @@ protected function _loadAssociatedByIds($assoc, $ids) if (!is_array($first) || count($first) !== count($primaryKey)) { return []; } - $filter = new TupleComparison($primaryKey, $ids, [], 'IN'); + $type = []; + $schema = $target->getSchema(); + foreach ((array)$target->getPrimaryKey() as $column) { + $type[] = $schema->getColumnType($column); + } + $filter = new TupleComparison($primaryKey, $ids, $type, 'IN'); } else { $filter = [$primaryKey[0] . ' IN' => $ids]; } @@ -587,7 +601,8 @@ public function merge(EntityInterface $entity, array $data, array $options = []) // change. Arrays will always be marked as dirty because // the original/updated list could contain references to the // same objects, even though those objects may have changed internally. - if ((is_scalar($value) && $original === $value) || + if ( + (is_scalar($value) && $original === $value) || ($value === null && $original === $value) || (is_object($value) && !($value instanceof EntityInterface) && $original == $value) ) { @@ -606,6 +621,7 @@ public function merge(EntityInterface $entity, array $data, array $options = []) $entity->setDirty($field, $value->isDirty()); } } + $this->dispatchAfterMarshal($entity, $data, $options); return $entity; } @@ -619,6 +635,7 @@ public function merge(EntityInterface $entity, array $data, array $options = []) $entity->setDirty($field, $properties[$field]->isDirty()); } } + $this->dispatchAfterMarshal($entity, $data, $options); return $entity; } @@ -747,14 +764,17 @@ protected function _mergeAssociation($original, $assoc, $value, $options) $targetTable = $assoc->getTarget(); $marshaller = $targetTable->marshaller(); $types = [Association::ONE_TO_ONE, Association::MANY_TO_ONE]; - if (in_array($assoc->type(), $types, true)) { + $type = $assoc->type(); + if (in_array($type, $types, true)) { + /** @psalm-suppress PossiblyInvalidArgument */ return $marshaller->merge($original, $value, (array)$options); } - if ($assoc->type() === Association::MANY_TO_MANY) { + if ($type === Association::MANY_TO_MANY) { + /** @psalm-suppress PossiblyInvalidArgument */ return $marshaller->_mergeBelongsToMany($original, $assoc, $value, (array)$options); } - if ($assoc->type() === Association::ONE_TO_MANY) { + if ($type === Association::ONE_TO_MANY) { $hasIds = array_key_exists('_ids', $value); $onlyIds = array_key_exists('onlyIds', $options) && $options['onlyIds']; if ($hasIds && is_array($value['_ids'])) { @@ -859,4 +879,19 @@ protected function _mergeJoinData($original, $assoc, $value, $options) return $records; } + + /** + * dispatch Model.afterMarshal event. + * + * @param \Cake\Datasource\EntityInterface $entity The entity that was marshaled. + * @param array $data readOnly $data to use. + * @param array $options List of options that are readOnly. + * @return void + */ + protected function dispatchAfterMarshal(EntityInterface $entity, array $data, array $options) + { + $data = new ArrayObject($data); + $options = new ArrayObject($options); + $this->_table->dispatchEvent('Model.afterMarshal', compact('entity', 'data', 'options')); + } } diff --git a/app/vendor/cakephp/cakephp/src/ORM/Query.php b/app/vendor/cakephp/cakephp/src/ORM/Query.php index 4107290fd..0dd1db232 100644 --- a/app/vendor/cakephp/cakephp/src/ORM/Query.php +++ b/app/vendor/cakephp/cakephp/src/ORM/Query.php @@ -43,9 +43,9 @@ * @method \Cake\Collection\CollectionInterface extract($field) Extracts a single column from each row * @method mixed max($field, $type = SORT_NUMERIC) Returns the maximum value for a single column in all the results. * @method mixed min($field, $type = SORT_NUMERIC) Returns the minimum value for a single column in all the results. - * @method \Cake\Collection\CollectionInterface groupBy(string|callable $field) In-memory group all results by the value of a column. - * @method \Cake\Collection\CollectionInterface indexBy(string|callable $field) Returns the results indexed by the value of a column. - * @method \Cake\Collection\CollectionInterface countBy(string|callable $field) Returns the number of unique values for a column + * @method \Cake\Collection\CollectionInterface groupBy(string|callable $callable) In-memory group all results by the value of a column. + * @method \Cake\Collection\CollectionInterface indexBy(string|callable $callable) Returns the results indexed by the value of a column. + * @method \Cake\Collection\CollectionInterface countBy(string|callable $callable) Returns the number of unique values for a column * @method float sumOf(string|callable $field) Returns the sum of all values for a single column * @method \Cake\Collection\CollectionInterface shuffle() In-memory randomize the order the results are returned * @method \Cake\Collection\CollectionInterface sample($size = 10) In-memory shuffle the results and return a subset of them. @@ -101,7 +101,7 @@ class Query extends DatabaseQuery implements JsonSerializable, QueryInterface * Whether the user select any fields before being executed, this is used * to determined if any fields should be automatically be selected. * - * @var bool + * @var bool|null */ protected $_hasFields; @@ -109,7 +109,7 @@ class Query extends DatabaseQuery implements JsonSerializable, QueryInterface * Tracks whether or not the original query should include * fields from the top level table. * - * @var bool + * @var bool|null */ protected $_autoFields; @@ -124,7 +124,7 @@ class Query extends DatabaseQuery implements JsonSerializable, QueryInterface * A callable function that can be used to calculate the total amount of * records this query will match when not using `limit` * - * @var callable + * @var callable|null */ protected $_counter; @@ -132,7 +132,7 @@ class Query extends DatabaseQuery implements JsonSerializable, QueryInterface * Instance of a class responsible for storing association containments and * for eager loading them when this query is executed * - * @var \Cake\ORM\EagerLoader + * @var \Cake\ORM\EagerLoader|null */ protected $_eagerLoader; @@ -228,8 +228,6 @@ public function select($fields = [], $overwrite = false) * been added to the query by the first. If you need to change the list after the first call, * pass overwrite boolean true which will reset the select clause removing all previous additions. * - * - * * @param \Cake\ORM\Table|\Cake\ORM\Association $table The table to use to get an array of columns * @param string[] $excludedFields The un-aliased column names you do not want selected from $table * @param bool $overwrite Whether to reset/remove previous selected fields @@ -656,7 +654,7 @@ public function leftJoinWith($assoc, callable $builder = null) $result = $this->getEagerLoader() ->setMatching($assoc, $builder, [ 'joinType' => QueryInterface::JOIN_TYPE_LEFT, - 'fields' => false + 'fields' => false, ]) ->getMatching(); $this->_addAssociationsToTypeMap($this->getRepository(), $this->getTypeMap(), $result); @@ -705,7 +703,7 @@ public function innerJoinWith($assoc, callable $builder = null) $result = $this->getEagerLoader() ->setMatching($assoc, $builder, [ 'joinType' => QueryInterface::JOIN_TYPE_INNER, - 'fields' => false + 'fields' => false, ]) ->getMatching(); $this->_addAssociationsToTypeMap($this->getRepository(), $this->getTypeMap(), $result); @@ -770,7 +768,7 @@ public function notMatching($assoc, callable $builder = null) ->setMatching($assoc, $builder, [ 'joinType' => QueryInterface::JOIN_TYPE_LEFT, 'fields' => false, - 'negateMatch' => true + 'negateMatch' => true, ]) ->getMatching(); $this->_addAssociationsToTypeMap($this->getRepository(), $this->getTypeMap(), $result); @@ -878,6 +876,19 @@ public function cleanCopy() return $clone; } + /** + * Clears the internal result cache and the internal count value from the current + * query object. + * + * @return $this + */ + public function clearResult() + { + $this->_dirty(); + + return $this; + } + /** * Object clone hook. * @@ -1105,21 +1116,24 @@ public function triggerBeforeFind() $repository->dispatchEvent('Model.beforeFind', [ $this, new ArrayObject($this->_options), - !$this->isEagerLoaded() + !$this->isEagerLoaded(), ]); } } /** - * {@inheritDoc} + * Converts the Node into a SQL string fragment. + * + * @param \Cake\Database\ValueBinder|null $generator Placeholder generator object + * @return string */ - public function sql(ValueBinder $binder = null) + public function sql(ValueBinder $generator = null) { $this->triggerBeforeFind(); $this->_transformQuery(); - return parent::sql($binder); + return parent::sql($generator); } /** @@ -1341,7 +1355,7 @@ public function __debugInfo() 'contain' => $eagerLoader ? $eagerLoader->getContain() : [], 'matching' => $eagerLoader ? $eagerLoader->getMatching() : [], 'extraOptions' => $this->_options, - 'repository' => $this->_repository + 'repository' => $this->_repository, ]; } @@ -1391,7 +1405,7 @@ public function disableAutoFields() * By default calling select() will disable auto-fields. You can re-enable * auto-fields with enableAutoFields(). * - * @return bool The current value. + * @return bool|null The current value. Returns null if neither enabled or disabled yet. */ public function isAutoFieldsEnabled() { @@ -1406,7 +1420,7 @@ public function isAutoFieldsEnabled() * * @deprecated 3.4.0 Use enableAutoFields()/isAutoFieldsEnabled() instead. * @param bool|null $value The value to set or null to read the current value. - * @return bool|$this Either the current value or the query object. + * @return bool|null|$this Either the current value or the query object. */ public function autoFields($value = null) { diff --git a/app/vendor/cakephp/cakephp/src/ORM/README.md b/app/vendor/cakephp/cakephp/src/ORM/README.md index 19ac4a00d..0e51ff4c0 100644 --- a/app/vendor/cakephp/cakephp/src/ORM/README.md +++ b/app/vendor/cakephp/cakephp/src/ORM/README.md @@ -59,7 +59,7 @@ use Cake\ORM\Locator\LocatorAwareTrait; $articles = $this->getTableLocator()->get('Articles'); ``` -By default classes using `LocatorAwareTrait` will share a global locator instance. +By default, classes using `LocatorAwareTrait` will share a global locator instance. You can inject your own locator instance into the object: ```php @@ -78,12 +78,12 @@ In your table classes you can define the relations between your tables. CakePHP' supports 4 association types out of the box: * belongsTo - E.g. Many articles belong to a user. -* hasOne - E.g. A user has one profile -* hasMany - E.g. A user has many articles +* hasOne - E.g. A user has one profile. +* hasMany - E.g. A user has many articles. * belongsToMany - E.g. An article belongsToMany tags. You define associations in your table's `initialize()` method. See the -[documentation](https://book.cakephp.org/3.0/en/orm/associations.html) for +[documentation](https://book.cakephp.org/3/en/orm/associations.html) for complete examples. ## Reading Data @@ -99,8 +99,8 @@ foreach ($articles->find() as $article) { } ``` -You can use the [query builder](https://book.cakephp.org/3.0/en/orm/query-builder.html) to create -complex queries, and a [variety of methods](https://book.cakephp.org/3.0/en/orm/retrieving-data-and-resultsets.html) +You can use the [query builder](https://book.cakephp.org/3/en/orm/query-builder.html) to create +complex queries, and a [variety of methods](https://book.cakephp.org/3/en/orm/retrieving-data-and-resultsets.html) to access your data. ## Saving Data @@ -134,7 +134,7 @@ $articles->save($article, [ ``` The above shows how you can easily marshal and save an entity and its -associations in a simple & powerful way. Consult the [ORM documentation](https://book.cakephp.org/3.0/en/orm/saving-data.html) +associations in a simple & powerful way. Consult the [ORM documentation](https://book.cakephp.org/3/en/orm/saving-data.html) for more in-depth examples. ## Deleting Data @@ -149,7 +149,7 @@ $articles->delete($article); ## Meta Data Cache -It is recommended to enable meta data cache for production systems to avoid performance issues. +It is recommended to enable metadata cache for production systems to avoid performance issues. For e.g. file system strategy your bootstrap file could look like this: ```php use Cake\Cache\Engine\FileEngine; @@ -234,5 +234,5 @@ Configure::write('App.namespace', 'My\Log\SubNamespace'); ## Additional Documentation -Consult [the CakePHP ORM documentation](https://book.cakephp.org/3.0/en/orm.html) +Consult [the CakePHP ORM documentation](https://book.cakephp.org/3/en/orm.html) for more in-depth documentation. diff --git a/app/vendor/cakephp/cakephp/src/ORM/ResultSet.php b/app/vendor/cakephp/cakephp/src/ORM/ResultSet.php index 5d1554311..7cdb4e277 100644 --- a/app/vendor/cakephp/cakephp/src/ORM/ResultSet.php +++ b/app/vendor/cakephp/cakephp/src/ORM/ResultSet.php @@ -30,7 +30,6 @@ */ class ResultSet implements ResultSetInterface { - use CollectionTrait; /** @@ -124,7 +123,7 @@ class ResultSet implements ResultSetInterface /** * Tracks value of $_autoFields property of $query passed to constructor. * - * @var bool + * @var bool|null */ protected $_autoFields; @@ -506,7 +505,7 @@ protected function _groupResult($row) 'useSetters' => false, 'markClean' => true, 'markNew' => false, - 'guard' => false + 'guard' => false, ]; foreach ($this->_matchingMapColumns as $alias => $keys) { @@ -516,10 +515,10 @@ protected function _groupResult($row) array_intersect_key($row, $keys) ); if ($this->_hydrate) { - /* @var \Cake\ORM\Table $table */ + /** @var \Cake\ORM\Table $table */ $table = $matching['instance']; $options['source'] = $table->getRegistryAlias(); - /* @var \Cake\Datasource\EntityInterface $entity */ + /** @var \Cake\Datasource\EntityInterface $entity */ $entity = new $matching['entityClass']($results['_matchingData'][$alias], $options); $results['_matchingData'][$alias] = $entity; } @@ -546,7 +545,7 @@ protected function _groupResult($row) continue; } - /* @var \Cake\ORM\Association $instance */ + /** @var \Cake\ORM\Association $instance */ $instance = $assoc['instance']; if (!$assoc['canBeJoined'] && !isset($row[$alias])) { diff --git a/app/vendor/cakephp/cakephp/src/ORM/Rule/ExistsIn.php b/app/vendor/cakephp/cakephp/src/ORM/Rule/ExistsIn.php index d583120ba..104f9a86a 100644 --- a/app/vendor/cakephp/cakephp/src/ORM/Rule/ExistsIn.php +++ b/app/vendor/cakephp/cakephp/src/ORM/Rule/ExistsIn.php @@ -24,7 +24,6 @@ */ class ExistsIn { - /** * The list of fields to check * diff --git a/app/vendor/cakephp/cakephp/src/ORM/Rule/IsUnique.php b/app/vendor/cakephp/cakephp/src/ORM/Rule/IsUnique.php index 53713b1be..9d1524b13 100644 --- a/app/vendor/cakephp/cakephp/src/ORM/Rule/IsUnique.php +++ b/app/vendor/cakephp/cakephp/src/ORM/Rule/IsUnique.php @@ -21,7 +21,6 @@ */ class IsUnique { - /** * The list of fields to check * diff --git a/app/vendor/cakephp/cakephp/src/ORM/Rule/ValidCount.php b/app/vendor/cakephp/cakephp/src/ORM/Rule/ValidCount.php index 33a980812..33696ad7c 100644 --- a/app/vendor/cakephp/cakephp/src/ORM/Rule/ValidCount.php +++ b/app/vendor/cakephp/cakephp/src/ORM/Rule/ValidCount.php @@ -23,7 +23,6 @@ */ class ValidCount { - /** * The field to check * diff --git a/app/vendor/cakephp/cakephp/src/ORM/RulesChecker.php b/app/vendor/cakephp/cakephp/src/ORM/RulesChecker.php index c9e1d8a99..1457f6768 100644 --- a/app/vendor/cakephp/cakephp/src/ORM/RulesChecker.php +++ b/app/vendor/cakephp/cakephp/src/ORM/RulesChecker.php @@ -28,7 +28,6 @@ */ class RulesChecker extends BaseRulesChecker { - /** * Returns a callable that can be used as a rule for checking the uniqueness of a value * in the table. @@ -83,7 +82,7 @@ public function isUnique(array $fields, $message = null) * 'message' sets a custom error message. * Set 'allowNullableNulls' to true to accept composite foreign keys where one or more nullable columns are null. * - * @param string|array $field The field or list of fields to check for existence by + * @param string|string[] $field The field or list of fields to check for existence by * primary key lookup in the other table. * @param object|string $table The table name where the fields existence will be checked. * @param string|array|null $message The error message to show in case the rule does not pass. Can diff --git a/app/vendor/cakephp/cakephp/src/ORM/SaveOptionsBuilder.php b/app/vendor/cakephp/cakephp/src/ORM/SaveOptionsBuilder.php index f3ea0b95c..470ed5023 100644 --- a/app/vendor/cakephp/cakephp/src/ORM/SaveOptionsBuilder.php +++ b/app/vendor/cakephp/cakephp/src/ORM/SaveOptionsBuilder.php @@ -27,7 +27,6 @@ */ class SaveOptionsBuilder extends ArrayObject { - use AssociationsNormalizerTrait; /** diff --git a/app/vendor/cakephp/cakephp/src/ORM/Table.php b/app/vendor/cakephp/cakephp/src/ORM/Table.php index 4084a3dc2..45fc47a35 100644 --- a/app/vendor/cakephp/cakephp/src/ORM/Table.php +++ b/app/vendor/cakephp/cakephp/src/ORM/Table.php @@ -20,6 +20,7 @@ use Cake\Database\Schema\TableSchema; use Cake\Database\Type; use Cake\Datasource\ConnectionInterface; +use Cake\Datasource\ConnectionManager; use Cake\Datasource\EntityInterface; use Cake\Datasource\Exception\InvalidPrimaryKeyException; use Cake\Datasource\RepositoryInterface; @@ -39,6 +40,7 @@ use Cake\Utility\Inflector; use Cake\Validation\ValidatorAwareInterface; use Cake\Validation\ValidatorAwareTrait; +use Exception; use InvalidArgumentException; use RuntimeException; @@ -126,7 +128,6 @@ */ class Table implements RepositoryInterface, EventListenerInterface, EventDispatcherInterface, ValidatorAwareInterface { - use EventDispatcherTrait; use RulesAwareTrait; use ValidatorAwareTrait; @@ -424,6 +425,7 @@ public function getAlias() /** * {@inheritDoc} + * * @deprecated 3.4.0 Use setAlias()/getAlias() instead. */ public function alias($alias = null) @@ -523,6 +525,10 @@ public function setConnection(ConnectionInterface $connection) */ public function getConnection() { + if (!$this->_connection) { + $this->_connection = ConnectionManager::get(static::defaultConnectionName()); + } + return $this->_connection; } @@ -583,7 +589,7 @@ public function setSchema($schema) unset($schema['_constraints']); } - $schema = new TableSchema($this->getTable(), $schema); + $schema = $this->getConnection()->getDriver()->newTableSchema($this->getTable(), $schema); foreach ($constraints as $name => $value) { $schema->addConstraint($name, $value); @@ -1129,6 +1135,12 @@ public function addAssociations(array $params) * - finder: The finder method to use when loading records from this association. * Defaults to 'all'. When the strategy is 'join', only the fields, containments, * and where conditions will be used from the finder. + * - propertyName: The property name that should be filled with data from the + * associated table into the source table results. By default this is the underscored + * & singular name of the association. For an association of ProductCategories it would + * be product_category. + * - bindingKey: The name of the column in the other table used to match 'foreignKey'. + * The default value is the primary key of the other table. * * This method will return the association object that was built. * @@ -1175,6 +1187,12 @@ public function belongsTo($associated, array $options = []) * - finder: The finder method to use when loading records from this association. * Defaults to 'all'. When the strategy is 'join', only the fields, containments, * and where conditions will be used from the finder. + * - propertyName: The property name that should be filled with data from the + * associated table into the source table results. By default this is the underscored + * & singular name of the association. For an association of ProductCategories it would + * be product_category. + * - bindingKey: The name of the column in the other table used to match 'foreignKey'. + * The default value is the primary key of the other table. * * This method will return the association object that was built. * @@ -1227,6 +1245,12 @@ public function hasOne($associated, array $options = []) * target table. * - finder: The finder method to use when loading records from this association. * Defaults to 'all'. + * - propertyName: The property name that should be filled with data from the + * associated table into the source table results. By default this is the underscored + * & singular name of the association. For an association of ProductCategories it would + * be product_category. + * - bindingKey: The name of the column in the other table used to match 'foreignKey'. + * The default value is the primary key of the other table. * * This method will return the association object that was built. * @@ -1281,6 +1305,12 @@ public function hasMany($associated, array $options = []) * - strategy: The loading strategy to use. 'select' and 'subquery' are supported. * - finder: The finder method to use when loading records from this association. * Defaults to 'all'. + * - propertyName: The property name that should be filled with data from the + * associated table into the source table results. By default this is the underscored + * & singular name of the association. For an association of ProductCategories it would + * be product_category. + * - bindingKey: The name of the column in the other table used to match 'foreignKey'. + * The default value is the primary key of the other table. * * This method will return the association object that was built. * @@ -1442,7 +1472,7 @@ public function findList(Query $query, array $options) $options += [ 'keyField' => $this->getPrimaryKey(), 'valueField' => $this->getDisplayField(), - 'groupField' => null + 'groupField' => null, ]; if (isset($options['idField'])) { @@ -1451,7 +1481,8 @@ public function findList(Query $query, array $options) deprecationWarning('Option "idField" is deprecated, use "keyField" instead.'); } - if (!$query->clause('select') && + if ( + !$query->clause('select') && !is_object($options['keyField']) && !is_object($options['valueField']) && !is_object($options['groupField']) @@ -1511,7 +1542,7 @@ public function findThreaded(Query $query, array $options) $options += [ 'keyField' => $this->getPrimaryKey(), 'parentField' => 'parent_id', - 'nestingKey' => 'children' + 'nestingKey' => 'children', ]; if (isset($options['idField'])) { @@ -1578,8 +1609,8 @@ protected function _setFieldMatchers($options, $keys) * $article = $articles->get(1, ['contain' => ['Users', 'Comments']]); * ``` * - * @throws \Cake\Datasource\Exception\InvalidPrimaryKeyException When $primaryKey has an - * incorrect number of elements. + * @throws \Cake\Datasource\Exception\InvalidPrimaryKeyException When the given `$primaryKey` + * was not found in the table. */ public function get($primaryKey, $options = []) { @@ -1904,7 +1935,7 @@ public function exists($conditions) * ``` * * @param \Cake\Datasource\EntityInterface $entity - * @param array $options + * @param \Cake\ORM\SaveOptionsBuilder|array $options * @return \Cake\Datasource\EntityInterface|false * @throws \Cake\ORM\Exception\RolledbackTransactionException If the transaction is aborted in the afterSave event. */ @@ -1919,7 +1950,7 @@ public function save(EntityInterface $entity, $options = []) 'associated' => true, 'checkRules' => true, 'checkExisting' => true, - '_primary' => true + '_primary' => true, ]); if ($entity->hasErrors($options['associated'])) { @@ -1940,7 +1971,7 @@ public function save(EntityInterface $entity, $options = []) } if ($options['atomic'] || $options['_primary']) { $entity->clean(); - $entity->isNew(false); + $entity->setNew(false); $entity->setSource($this->getRegistryAlias()); } } @@ -1973,7 +2004,7 @@ public function saveOrFail(EntityInterface $entity, $options = []) * * @param \Cake\Datasource\EntityInterface $entity the entity to be saved * @param \ArrayObject $options the options to use for the save operation - * @return \Cake\Datasource\EntityInterface|bool + * @return \Cake\Datasource\EntityInterface|false * @throws \RuntimeException When an entity is missing some of the primary keys. * @throws \Cake\ORM\Exception\RolledbackTransactionException If the transaction * is aborted in the afterSave event. @@ -1988,7 +2019,7 @@ protected function _processSave($entity, $options) foreach ($entity->extract($primaryColumns) as $k => $v) { $conditions["$alias.$k"] = $v; } - $entity->isNew(!$this->exists($conditions)); + $entity->setNew(!$this->exists($conditions)); } $mode = $entity->isNew() ? RulesChecker::CREATE : RulesChecker::UPDATE; @@ -2029,7 +2060,7 @@ protected function _processSave($entity, $options) if (!$success && $isNew) { $entity->unsetProperty($this->getPrimaryKey()); - $entity->isNew(true); + $entity->setNew(true); } return $success ? $entity : false; @@ -2066,7 +2097,7 @@ protected function _onSaveSuccess($entity, $options) if (!$options['atomic'] && !$options['_primary']) { $entity->clean(); - $entity->isNew(false); + $entity->setNew(false); $entity->setSource($this->getRegistryAlias()); } @@ -2078,7 +2109,7 @@ protected function _onSaveSuccess($entity, $options) * * @param \Cake\Datasource\EntityInterface $entity the subject entity from were $data was extracted * @param array $data The actual data that needs to be saved - * @return \Cake\Datasource\EntityInterface|bool + * @return \Cake\Datasource\EntityInterface|false * @throws \RuntimeException if not all the primary keys where supplied or could * be generated when the table has composite primary keys. Or when the table has no primary key. */ @@ -2176,7 +2207,7 @@ protected function _newId($primary) * * @param \Cake\Datasource\EntityInterface $entity the subject entity from were $data was extracted * @param array $data The actual data that needs to be saved - * @return \Cake\Datasource\EntityInterface|bool + * @return \Cake\Datasource\EntityInterface|false * @throws \InvalidArgumentException When primary key data is missing. */ protected function _update($entity, $data) @@ -2231,36 +2262,75 @@ protected function _update($entity, $data) */ public function saveMany($entities, $options = []) { + try { + return $this->_saveMany($entities, $options); + } catch (PersistenceFailedException $exception) { + return false; + } + } + + /** + * Persists multiple entities of a table. + * + * The records will be saved in a transaction which will be rolled back if + * any one of the records fails to save due to failed validation or database + * error. + * + * @param \Cake\Datasource\EntityInterface[]|\Cake\Datasource\ResultSetInterface $entities Entities to save. + * @param array|\ArrayAccess $options Options used when calling Table::save() for each entity. + * @return \Cake\Datasource\EntityInterface[]|\Cake\Datasource\ResultSetInterface Entities list. + * @throws \Exception + * @throws \Cake\ORM\Exception\PersistenceFailedException If an entity couldn't be saved. + */ + public function saveManyOrFail($entities, $options = []) + { + return $this->_saveMany($entities, $options); + } + + /** + * @param \Cake\Datasource\EntityInterface[]|\Cake\Datasource\ResultSetInterface $entities Entities to save. + * @param array|\ArrayAccess $options Options used when calling Table::save() for each entity. + * @return \Cake\Datasource\EntityInterface[]|\Cake\Datasource\ResultSetInterface Entities list. + * @throws \Cake\ORM\Exception\PersistenceFailedException If an entity couldn't be saved. + */ + protected function _saveMany($entities, $options = []) + { + /** @var bool[] $isNew */ $isNew = []; $cleanup = function ($entities) use (&$isNew) { + /** @var \Cake\Datasource\EntityInterface[] $entities */ foreach ($entities as $key => $entity) { if (isset($isNew[$key]) && $isNew[$key]) { $entity->unsetProperty($this->getPrimaryKey()); - $entity->isNew(true); + $entity->setNew(true); } } }; + /** @var \Cake\Datasource\EntityInterface|null $failed */ + $failed = null; try { - $return = $this->getConnection() - ->transactional(function () use ($entities, $options, &$isNew) { + $this->getConnection() + ->transactional(function () use ($entities, $options, &$isNew, &$failed) { foreach ($entities as $key => $entity) { $isNew[$key] = $entity->isNew(); if ($this->save($entity, $options) === false) { + $failed = $entity; + return false; } } }); - } catch (\Exception $e) { + } catch (Exception $e) { $cleanup($entities); throw $e; } - if ($return === false) { + if ($failed !== null) { $cleanup($entities); - return false; + throw new PersistenceFailedException($failed, ['saveMany']); } return $entities; @@ -2291,7 +2361,6 @@ public function saveMany($entities, $options = []) * The options argument will be converted into an \ArrayObject instance * for the duration of the callbacks, this allows listeners to modify * the options used in the delete operation. - * */ public function delete(EntityInterface $entity, $options = []) { @@ -2308,7 +2377,7 @@ public function delete(EntityInterface $entity, $options = []) if ($success && $this->_transactionCommitted($options['atomic'], $options['_primary'])) { $this->dispatchEvent('Model.afterDeleteCommit', [ 'entity' => $entity, - 'options' => $options + 'options' => $options, ]); } @@ -2335,6 +2404,91 @@ public function deleteOrFail(EntityInterface $entity, $options = []) return $deleted; } + /** + * Deletes multiple entities of a table. + * + * The records will be deleted in a transaction which will be rolled back if + * any one of the records fails to delete due to failed validation or database + * error. + * + * @param \Cake\Datasource\EntityInterface[]|\Cake\Datasource\ResultSetInterface $entities Entities to delete. + * @param array|\ArrayAccess $options Options used when calling Table::save() for each entity. + * @return bool|\Cake\Datasource\EntityInterface[]|\Cake\Datasource\ResultSetInterface + * False on failure, entities list on success. + * @throws \Exception + * @see \Cake\ORM\Table::delete() for options and events related to this method. + */ + public function deleteMany($entities, $options = []) + { + $failed = $this->_deleteMany($entities, $options); + + if ($failed !== null) { + return false; + } + + return $entities; + } + + /** + * Deletes multiple entities of a table. + * + * The records will be deleted in a transaction which will be rolled back if + * any one of the records fails to delete due to failed validation or database + * error. + * + * @param \Cake\Datasource\EntityInterface[]|\Cake\Datasource\ResultSetInterface $entities Entities to delete. + * @param array|\ArrayAccess $options Options used when calling Table::save() for each entity. + * @return \Cake\Datasource\EntityInterface[]|\Cake\Datasource\ResultSetInterface Entities list. + * @throws \Exception + * @throws \Cake\ORM\Exception\PersistenceFailedException + * @see \Cake\ORM\Table::delete() for options and events related to this method. + */ + public function deleteManyOrFail($entities, $options = []) + { + $failed = $this->_deleteMany($entities, $options); + + if ($failed !== null) { + throw new PersistenceFailedException($failed, ['deleteMany']); + } + + return $entities; + } + + /** + * @param \Cake\Datasource\EntityInterface[]|\Cake\Datasource\ResultSetInterface $entities Entities to delete. + * @param array|\ArrayAccess $options Options used. + * @return \Cake\Datasource\EntityInterface|null + */ + protected function _deleteMany($entities, $options = []) + { + $options = new ArrayObject((array)$options + [ + 'atomic' => true, + 'checkRules' => true, + '_primary' => true, + ]); + + $failed = $this->_executeTransaction(function () use ($entities, $options) { + foreach ($entities as $entity) { + if (!$this->_processDelete($entity, $options)) { + return $entity; + } + } + + return null; + }, $options['atomic']); + + if ($failed === null && $this->_transactionCommitted($options['atomic'], $options['_primary'])) { + foreach ($entities as $entity) { + $this->dispatchEvent('Model.afterDeleteCommit', [ + 'entity' => $entity, + 'options' => $options, + ]); + } + } + + return $failed; + } + /** * Perform the delete operation. * @@ -2365,7 +2519,7 @@ protected function _processDelete($entity, $options) $event = $this->dispatchEvent('Model.beforeDelete', [ 'entity' => $entity, - 'options' => $options + 'options' => $options, ]); if ($event->isStopped()) { @@ -2390,7 +2544,7 @@ protected function _processDelete($entity, $options) $this->dispatchEvent('Model.afterDelete', [ 'entity' => $entity, - 'options' => $options + 'options' => $options, ]); return $success; @@ -2400,7 +2554,6 @@ protected function _processDelete($entity, $options) * Returns true if the finder exists for the table * * @param string $type name of finder to check - * * @return bool */ public function hasFinder($type) @@ -2439,7 +2592,7 @@ public function callFinder($type, Query $query, array $options = []) } /** - * Provides the dynamic findBy and findByAll methods. + * Provides the dynamic findBy and findAllBy methods. * * @param string $method The method name that was fired. * @param array $args List of arguments passed to the function. @@ -2490,7 +2643,7 @@ protected function _dynamicFinder($method, $args) } elseif ($hasOr !== false) { $fields = explode('_or_', $fields); $conditions = [ - 'OR' => $makeConditions($fields, $args) + 'OR' => $makeConditions($fields, $args), ]; } elseif ($hasAnd !== false) { $fields = explode('_and_', $fields); @@ -2809,7 +2962,7 @@ public function validateUnique($value, array $options, array $context = null) [ 'useSetters' => false, 'markNew' => $context['newRecord'], - 'source' => $this->getRegistryAlias() + 'source' => $this->getRegistryAlias(), ] ); $fields = array_merge( @@ -2840,6 +2993,7 @@ public function validateUnique($value, array $options, array $context = null) * The conventional method map is: * * - Model.beforeMarshal => beforeMarshal + * - Model.afterMarshal => afterMarshal * - Model.buildValidator => buildValidator * - Model.beforeFind => beforeFind * - Model.beforeSave => beforeSave @@ -2857,6 +3011,7 @@ public function implementedEvents() { $eventMap = [ 'Model.beforeMarshal' => 'beforeMarshal', + 'Model.afterMarshal' => 'afterMarshal', 'Model.buildValidator' => 'buildValidator', 'Model.beforeFind' => 'beforeFind', 'Model.beforeSave' => 'beforeSave', @@ -2934,15 +3089,15 @@ public function getSaveOptionsBuilder(array $options = []) */ public function loadInto($entities, array $contain) { - return (new LazyEagerLoader)->loadInto($entities, $contain, $this); + return (new LazyEagerLoader())->loadInto($entities, $contain, $this); } /** * {@inheritDoc} */ - protected function validationMethodExists($method) + protected function validationMethodExists($name) { - return method_exists($this, $method) || $this->behaviors()->hasMethod($method); + return method_exists($this, $name) || $this->behaviors()->hasMethod($name); } /** @@ -2965,7 +3120,7 @@ public function __debugInfo() 'associations' => $associations ? $associations->keys() : false, 'behaviors' => $behaviors ? $behaviors->loaded() : false, 'defaultConnection' => static::defaultConnectionName(), - 'connectionName' => $conn ? $conn->configName() : null + 'connectionName' => $conn ? $conn->configName() : null, ]; } } diff --git a/app/vendor/cakephp/cakephp/src/ORM/TableRegistry.php b/app/vendor/cakephp/cakephp/src/ORM/TableRegistry.php index ee5056886..1cb465dfc 100644 --- a/app/vendor/cakephp/cakephp/src/ORM/TableRegistry.php +++ b/app/vendor/cakephp/cakephp/src/ORM/TableRegistry.php @@ -55,7 +55,6 @@ */ class TableRegistry { - /** * LocatorInterface implementation instance. * diff --git a/app/vendor/cakephp/cakephp/src/ORM/composer.json b/app/vendor/cakephp/cakephp/src/ORM/composer.json index 143289396..0ebc7f748 100644 --- a/app/vendor/cakephp/cakephp/src/ORM/composer.json +++ b/app/vendor/cakephp/cakephp/src/ORM/composer.json @@ -23,7 +23,7 @@ "source": "https://github.com/cakephp/orm" }, "require": { - "php": ">=5.6.0", + "php": ">=5.6.0,<8.0.0", "cakephp/collection": "^3.6.0", "cakephp/core": "^3.6.0", "cakephp/datasource": "^3.6.0", diff --git a/app/vendor/cakephp/cakephp/src/Routing/Dispatcher.php b/app/vendor/cakephp/cakephp/src/Routing/Dispatcher.php index d1a3f2be4..df29aa638 100644 --- a/app/vendor/cakephp/cakephp/src/Routing/Dispatcher.php +++ b/app/vendor/cakephp/cakephp/src/Routing/Dispatcher.php @@ -30,7 +30,6 @@ */ class Dispatcher { - use EventDispatcherTrait; /** diff --git a/app/vendor/cakephp/cakephp/src/Routing/DispatcherFactory.php b/app/vendor/cakephp/cakephp/src/Routing/DispatcherFactory.php index 91dc68620..4b178fd5c 100644 --- a/app/vendor/cakephp/cakephp/src/Routing/DispatcherFactory.php +++ b/app/vendor/cakephp/cakephp/src/Routing/DispatcherFactory.php @@ -26,7 +26,6 @@ */ class DispatcherFactory { - /** * Stack of middleware to apply to dispatchers. * diff --git a/app/vendor/cakephp/cakephp/src/Routing/DispatcherFilter.php b/app/vendor/cakephp/cakephp/src/Routing/DispatcherFilter.php index 3cb186d48..7b4f9d88c 100644 --- a/app/vendor/cakephp/cakephp/src/Routing/DispatcherFilter.php +++ b/app/vendor/cakephp/cakephp/src/Routing/DispatcherFilter.php @@ -120,11 +120,11 @@ public function implementedEvents() return [ 'Dispatcher.beforeDispatch' => [ 'callable' => 'handle', - 'priority' => $this->_config['priority'] + 'priority' => $this->_config['priority'], ], 'Dispatcher.afterDispatch' => [ 'callable' => 'handle', - 'priority' => $this->_config['priority'] + 'priority' => $this->_config['priority'], ], ]; } @@ -155,7 +155,7 @@ public function handle(Event $event) */ public function matches(Event $event) { - /* @var \Cake\Http\ServerRequest $request */ + /** @var \Cake\Http\ServerRequest $request */ $request = $event->getData('request'); $pass = true; if (!empty($this->_config['for'])) { diff --git a/app/vendor/cakephp/cakephp/src/Routing/Exception/DuplicateNamedRouteException.php b/app/vendor/cakephp/cakephp/src/Routing/Exception/DuplicateNamedRouteException.php index 4fbcbe83d..253d1b885 100644 --- a/app/vendor/cakephp/cakephp/src/Routing/Exception/DuplicateNamedRouteException.php +++ b/app/vendor/cakephp/cakephp/src/Routing/Exception/DuplicateNamedRouteException.php @@ -19,7 +19,6 @@ */ class DuplicateNamedRouteException extends Exception { - /** * {@inheritDoc} */ diff --git a/app/vendor/cakephp/cakephp/src/Routing/Exception/MissingControllerException.php b/app/vendor/cakephp/cakephp/src/Routing/Exception/MissingControllerException.php index 5bd79f49a..dfbdada1d 100644 --- a/app/vendor/cakephp/cakephp/src/Routing/Exception/MissingControllerException.php +++ b/app/vendor/cakephp/cakephp/src/Routing/Exception/MissingControllerException.php @@ -20,7 +20,6 @@ */ class MissingControllerException extends Exception { - /** * {@inheritDoc} */ diff --git a/app/vendor/cakephp/cakephp/src/Routing/Exception/MissingDispatcherFilterException.php b/app/vendor/cakephp/cakephp/src/Routing/Exception/MissingDispatcherFilterException.php index 647760af3..945b38d3d 100644 --- a/app/vendor/cakephp/cakephp/src/Routing/Exception/MissingDispatcherFilterException.php +++ b/app/vendor/cakephp/cakephp/src/Routing/Exception/MissingDispatcherFilterException.php @@ -19,7 +19,6 @@ */ class MissingDispatcherFilterException extends Exception { - /** * {@inheritDoc} */ diff --git a/app/vendor/cakephp/cakephp/src/Routing/Exception/MissingRouteException.php b/app/vendor/cakephp/cakephp/src/Routing/Exception/MissingRouteException.php index 84ffbfcc6..7a03641de 100644 --- a/app/vendor/cakephp/cakephp/src/Routing/Exception/MissingRouteException.php +++ b/app/vendor/cakephp/cakephp/src/Routing/Exception/MissingRouteException.php @@ -20,7 +20,6 @@ */ class MissingRouteException extends Exception { - /** * {@inheritDoc} */ diff --git a/app/vendor/cakephp/cakephp/src/Routing/Exception/RedirectException.php b/app/vendor/cakephp/cakephp/src/Routing/Exception/RedirectException.php index 2a392b95a..4c5c0a888 100644 --- a/app/vendor/cakephp/cakephp/src/Routing/Exception/RedirectException.php +++ b/app/vendor/cakephp/cakephp/src/Routing/Exception/RedirectException.php @@ -28,7 +28,6 @@ */ class RedirectException extends Exception { - /** * {@inheritDoc} */ diff --git a/app/vendor/cakephp/cakephp/src/Routing/Filter/AssetFilter.php b/app/vendor/cakephp/cakephp/src/Routing/Filter/AssetFilter.php index b60b045fc..7c829e0df 100644 --- a/app/vendor/cakephp/cakephp/src/Routing/Filter/AssetFilter.php +++ b/app/vendor/cakephp/cakephp/src/Routing/Filter/AssetFilter.php @@ -27,7 +27,6 @@ */ class AssetFilter extends DispatcherFilter { - /** * Default priority for all methods in this filter * This filter should run before the request gets parsed by router @@ -44,7 +43,6 @@ class AssetFilter extends DispatcherFilter protected $_cacheTime = '+1 day'; /** - * * Constructor. * * @param array $config Array of config. @@ -66,7 +64,7 @@ public function __construct($config = []) */ public function beforeDispatch(Event $event) { - /* @var \Cake\Http\ServerRequest $request */ + /** @var \Cake\Http\ServerRequest $request */ $request = $event->getData('request'); $url = urldecode($request->getUri()->getPath()); @@ -78,7 +76,7 @@ public function beforeDispatch(Event $event) if ($assetFile === null || !file_exists($assetFile)) { return null; } - /* @var \Cake\Http\Response $response */ + /** @var \Cake\Http\Response $response */ $response = $event->getData('response'); $event->stopPropagation(); diff --git a/app/vendor/cakephp/cakephp/src/Routing/Filter/ControllerFactoryFilter.php b/app/vendor/cakephp/cakephp/src/Routing/Filter/ControllerFactoryFilter.php index 7a6164c59..aec14df8b 100644 --- a/app/vendor/cakephp/cakephp/src/Routing/Filter/ControllerFactoryFilter.php +++ b/app/vendor/cakephp/cakephp/src/Routing/Filter/ControllerFactoryFilter.php @@ -27,7 +27,6 @@ */ class ControllerFactoryFilter extends DispatcherFilter { - /** * Priority is set high to allow other filters to be called first. * diff --git a/app/vendor/cakephp/cakephp/src/Routing/Filter/LocaleSelectorFilter.php b/app/vendor/cakephp/cakephp/src/Routing/Filter/LocaleSelectorFilter.php index 63a9ada1f..a65384ac5 100644 --- a/app/vendor/cakephp/cakephp/src/Routing/Filter/LocaleSelectorFilter.php +++ b/app/vendor/cakephp/cakephp/src/Routing/Filter/LocaleSelectorFilter.php @@ -26,7 +26,6 @@ */ class LocaleSelectorFilter extends DispatcherFilter { - /** * List of valid locales for the request * @@ -58,7 +57,7 @@ public function __construct($config = []) */ public function beforeDispatch(Event $event) { - /* @var \Cake\Http\ServerRequest $request */ + /** @var \Cake\Http\ServerRequest $request */ $request = $event->getData('request'); $locale = Locale::acceptFromHttp($request->getHeaderLine('Accept-Language')); diff --git a/app/vendor/cakephp/cakephp/src/Routing/Filter/RoutingFilter.php b/app/vendor/cakephp/cakephp/src/Routing/Filter/RoutingFilter.php index ed9f378a7..509e73f2b 100644 --- a/app/vendor/cakephp/cakephp/src/Routing/Filter/RoutingFilter.php +++ b/app/vendor/cakephp/cakephp/src/Routing/Filter/RoutingFilter.php @@ -27,7 +27,6 @@ */ class RoutingFilter extends DispatcherFilter { - /** * Priority setting. * @@ -47,7 +46,7 @@ class RoutingFilter extends DispatcherFilter */ public function beforeDispatch(Event $event) { - /* @var \Cake\Http\ServerRequest $request */ + /** @var \Cake\Http\ServerRequest $request */ $request = $event->getData('request'); if (Router::getRequest(true) !== $request) { Router::setRequestInfo($request); @@ -62,7 +61,7 @@ public function beforeDispatch(Event $event) return null; } catch (RedirectException $e) { $event->stopPropagation(); - /* @var \Cake\Http\Response $response */ + /** @var \Cake\Http\Response $response */ $response = $event->getData('response'); $response = $response->withStatus($e->getCode()) ->withLocation($e->getMessage()); diff --git a/app/vendor/cakephp/cakephp/src/Routing/Middleware/AssetMiddleware.php b/app/vendor/cakephp/cakephp/src/Routing/Middleware/AssetMiddleware.php index de40cc267..035f9355e 100644 --- a/app/vendor/cakephp/cakephp/src/Routing/Middleware/AssetMiddleware.php +++ b/app/vendor/cakephp/cakephp/src/Routing/Middleware/AssetMiddleware.php @@ -17,10 +17,10 @@ use Cake\Core\Plugin; use Cake\Filesystem\File; use Cake\Utility\Inflector; +use Laminas\Diactoros\Response; +use Laminas\Diactoros\Stream; use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface; -use Zend\Diactoros\Response; -use Zend\Diactoros\Stream; /** * Handles serving plugin assets in development mode. @@ -174,9 +174,9 @@ protected function deliverAsset(ServerRequestInterface $request, ResponseInterfa return $response->withBody($stream) ->withHeader('Content-Type', $contentType) ->withHeader('Cache-Control', 'public,max-age=' . $maxAge) - ->withHeader('Date', gmdate('D, j M Y G:i:s \G\M\T', time())) - ->withHeader('Last-Modified', gmdate('D, j M Y G:i:s \G\M\T', $modified)) - ->withHeader('Expires', gmdate('D, j M Y G:i:s \G\M\T', $expire)); + ->withHeader('Date', gmdate('D, d M Y H:i:s \G\M\T', time())) + ->withHeader('Last-Modified', gmdate('D, d M Y H:i:s \G\M\T', $modified)) + ->withHeader('Expires', gmdate('D, d M Y H:i:s \G\M\T', $expire)); } /** diff --git a/app/vendor/cakephp/cakephp/src/Routing/Middleware/RoutingMiddleware.php b/app/vendor/cakephp/cakephp/src/Routing/Middleware/RoutingMiddleware.php index f9a71e40d..d47c42bc8 100644 --- a/app/vendor/cakephp/cakephp/src/Routing/Middleware/RoutingMiddleware.php +++ b/app/vendor/cakephp/cakephp/src/Routing/Middleware/RoutingMiddleware.php @@ -21,9 +21,9 @@ use Cake\Http\Runner; use Cake\Routing\Exception\RedirectException; use Cake\Routing\Router; +use Laminas\Diactoros\Response\RedirectResponse; use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface; -use Zend\Diactoros\Response\RedirectResponse; /** * Applies routing rules to the request and creates the controller @@ -33,6 +33,8 @@ class RoutingMiddleware { /** * Key used to store the route collection in the cache engine + * + * @var string */ const ROUTE_COLLECTION_CACHE_KEY = 'routeCollection'; @@ -153,7 +155,7 @@ public function __invoke(ServerRequestInterface $request, ResponseInterface $res } catch (RedirectException $e) { return new RedirectResponse( $e->getMessage(), - $e->getCode(), + (int)$e->getCode(), $response->getHeaders() ); } diff --git a/app/vendor/cakephp/cakephp/src/Routing/RequestActionTrait.php b/app/vendor/cakephp/cakephp/src/Routing/RequestActionTrait.php index 27f535002..4c7fd4e76 100644 --- a/app/vendor/cakephp/cakephp/src/Routing/RequestActionTrait.php +++ b/app/vendor/cakephp/cakephp/src/Routing/RequestActionTrait.php @@ -27,7 +27,6 @@ */ trait RequestActionTrait { - /** * Calls a controller's method from any location. Can be used to connect controllers together * or tie plugins into a main application. requestAction can be used to return rendered views @@ -122,14 +121,14 @@ public function requestAction($url, array $extra = []) } if (is_string($url)) { $params = [ - 'url' => $url + 'url' => $url, ]; } elseif (is_array($url)) { $defaultParams = ['plugin' => null, 'controller' => null, 'action' => null]; $params = [ 'params' => $url + $defaultParams, 'base' => false, - 'url' => Router::reverse($url) + 'url' => Router::reverse($url), ]; if (empty($params['params']['pass'])) { $params['params']['pass'] = []; @@ -166,7 +165,7 @@ public function requestAction($url, array $extra = []) // we need to 'fix' their missing dispatcher filters. $needed = [ 'routing' => RoutingFilter::class, - 'controller' => ControllerFactoryFilter::class + 'controller' => ControllerFactoryFilter::class, ]; foreach ($dispatcher->filters() as $filter) { if ($filter instanceof RoutingFilter) { @@ -177,7 +176,7 @@ public function requestAction($url, array $extra = []) } } foreach ($needed as $class) { - $dispatcher->addFilter(new $class); + $dispatcher->addFilter(new $class()); } $result = $dispatcher->dispatch($request, new Response()); Router::popRequest(); diff --git a/app/vendor/cakephp/cakephp/src/Routing/Route/DashedRoute.php b/app/vendor/cakephp/cakephp/src/Routing/Route/DashedRoute.php index 71ff7f436..d21be8e14 100644 --- a/app/vendor/cakephp/cakephp/src/Routing/Route/DashedRoute.php +++ b/app/vendor/cakephp/cakephp/src/Routing/Route/DashedRoute.php @@ -23,7 +23,6 @@ */ class DashedRoute extends Route { - /** * Flag for tracking whether or not the defaults have been inflected. * diff --git a/app/vendor/cakephp/cakephp/src/Routing/Route/InflectedRoute.php b/app/vendor/cakephp/cakephp/src/Routing/Route/InflectedRoute.php index face5d188..cf5de1523 100644 --- a/app/vendor/cakephp/cakephp/src/Routing/Route/InflectedRoute.php +++ b/app/vendor/cakephp/cakephp/src/Routing/Route/InflectedRoute.php @@ -22,7 +22,6 @@ */ class InflectedRoute extends Route { - /** * Flag for tracking whether or not the defaults have been inflected. * diff --git a/app/vendor/cakephp/cakephp/src/Routing/Route/PluginShortRoute.php b/app/vendor/cakephp/cakephp/src/Routing/Route/PluginShortRoute.php index 2e7cf7d50..9b780d6ae 100644 --- a/app/vendor/cakephp/cakephp/src/Routing/Route/PluginShortRoute.php +++ b/app/vendor/cakephp/cakephp/src/Routing/Route/PluginShortRoute.php @@ -20,7 +20,6 @@ */ class PluginShortRoute extends InflectedRoute { - /** * Parses a string URL into an array. If a plugin key is found, it will be copied to the * controller parameter. diff --git a/app/vendor/cakephp/cakephp/src/Routing/Route/RedirectRoute.php b/app/vendor/cakephp/cakephp/src/Routing/Route/RedirectRoute.php index 7de437913..3729f54ea 100644 --- a/app/vendor/cakephp/cakephp/src/Routing/Route/RedirectRoute.php +++ b/app/vendor/cakephp/cakephp/src/Routing/Route/RedirectRoute.php @@ -27,7 +27,6 @@ */ class RedirectRoute extends Route { - /** * A Response object * diff --git a/app/vendor/cakephp/cakephp/src/Routing/Route/Route.php b/app/vendor/cakephp/cakephp/src/Routing/Route/Route.php index d175e395a..d9bc270c2 100644 --- a/app/vendor/cakephp/cakephp/src/Routing/Route/Route.php +++ b/app/vendor/cakephp/cakephp/src/Routing/Route/Route.php @@ -28,7 +28,6 @@ */ class Route { - /** * An array of named segments in a Route. * `/:controller/:action/:id` has 3 key elements @@ -143,7 +142,7 @@ public function __construct($template, $defaults = [], array $options = []) * Get/Set the supported extensions for this route. * * @deprecated 3.3.9 Use getExtensions/setExtensions instead. - * @param null|string|array $extensions The extensions to set. Use null to get. + * @param array|string|null $extensions The extensions to set. Use null to get. * @return array|null The extensions or null. */ public function extensions($extensions = null) @@ -220,7 +219,7 @@ public function setPatterns(array $patterns) if (mb_strlen($patternValues) < strlen($patternValues)) { $this->options['multibytePattern'] = true; } - $this->options = array_merge($this->options, $patterns); + $this->options = $patterns + $this->options; return $this; } @@ -280,7 +279,7 @@ public function setPersist(array $names) */ public function compiled() { - return !empty($this->_compiledRoute); + return $this->_compiledRoute !== null; } /** @@ -388,11 +387,14 @@ public function getName() 'prefix' => ':', 'plugin' => '.', 'controller' => ':', - 'action' => '' + 'action' => '', ]; foreach ($keys as $key => $glue) { $value = null; - if (strpos($this->template, ':' . $key) !== false) { + if ( + strpos($this->template, ':' . $key) !== false + || strpos($this->template, '{' . $key . '}') !== false + ) { $value = '_' . $key; } elseif (isset($this->defaults[$key])) { $value = $this->defaults[$key]; @@ -622,7 +624,8 @@ public function match(array $url, array $context = []) $defaults = $this->defaults; $context += ['params' => [], '_port' => null, '_scheme' => null, '_host' => null]; - if (!empty($this->options['persist']) && + if ( + !empty($this->options['persist']) && is_array($this->options['persist']) ) { $url = $this->_persistParams($url, $context['params']); @@ -647,7 +650,8 @@ public function match(array $url, array $context = []) // Check for properties that will cause an // absolute url. Copy the other properties over. - if (isset($hostOptions['_scheme']) || + if ( + isset($hostOptions['_scheme']) || isset($hostOptions['_port']) || isset($hostOptions['_host']) ) { @@ -742,13 +746,21 @@ public function match(array $url, array $context = []) // check patterns for routed params if (!empty($this->options)) { foreach ($this->options as $key => $pattern) { - if (isset($url[$key]) && !preg_match('#^' . $pattern . '$#u', $url[$key])) { + if (isset($url[$key]) && !preg_match('#^' . $pattern . '$#u', (string)$url[$key])) { return false; } } } $url += $hostOptions; + // Ensure controller/action keys are not null. + if ( + (isset($keyNames['controller']) && !isset($url['controller'])) || + (isset($keyNames['action']) && !isset($url['action'])) + ) { + return false; + } + return $this->_writeUrl($url, $pass, $query); } @@ -799,12 +811,10 @@ protected function _writeUrl($params, $pass = [], $query = []) $search = $replace = []; foreach ($this->keys as $key) { - $string = null; - if (isset($params[$key])) { - $string = $params[$key]; - } elseif (strpos($out, $key) != strlen($out) - strlen($key)) { - $key .= '/'; + if (!array_key_exists($key, $params)) { + throw new InvalidArgumentException("Missing required route key `{$key}`"); } + $string = $params[$key]; if ($this->braceKeys) { $search[] = "{{$key}}"; } else { @@ -829,7 +839,8 @@ protected function _writeUrl($params, $pass = [], $query = []) } $out = str_replace('//', '/', $out); - if (isset($params['_scheme']) || + if ( + isset($params['_scheme']) || isset($params['_host']) || isset($params['_port']) ) { diff --git a/app/vendor/cakephp/cakephp/src/Routing/RouteBuilder.php b/app/vendor/cakephp/cakephp/src/Routing/RouteBuilder.php index 5074ded44..f6a7b2f3e 100644 --- a/app/vendor/cakephp/cakephp/src/Routing/RouteBuilder.php +++ b/app/vendor/cakephp/cakephp/src/Routing/RouteBuilder.php @@ -31,7 +31,6 @@ */ class RouteBuilder { - /** * Regular expression for auto increment IDs * @@ -105,7 +104,7 @@ class RouteBuilder * The list of middleware that routes in this builder get * added during construction. * - * @var array + * @var string[] */ protected $middleware = []; @@ -192,8 +191,8 @@ public function getRouteClass() * extensions applied. However, setting extensions does not modify existing routes. * * @deprecated 3.5.0 Use getExtensions/setExtensions instead. - * @param null|string|array $extensions Either the extensions to use or null. - * @return array|null + * @param string[]|string|null $extensions Either the extensions to use or null. + * @return string[]|null */ public function extensions($extensions = null) { @@ -236,7 +235,7 @@ public function getExtensions() /** * Add additional extensions to what is already in current scope * - * @param string|array $extensions One or more extensions to add + * @param string|string[] $extensions One or more extensions to add * @return void */ public function addExtensions($extensions) @@ -470,9 +469,9 @@ public function resources($name, $options = [], $callback = null) * Create a route that only responds to GET requests. * * @param string $template The URL template to use. - * @param array $target An array describing the target route parameters. These parameters + * @param array|string $target An array describing the target route parameters. These parameters * should indicate the plugin, prefix, controller, and action that this route points to. - * @param string $name The name of the route. + * @param string|null $name The name of the route. * @return \Cake\Routing\Route\Route */ public function get($template, $target, $name = null) @@ -484,9 +483,9 @@ public function get($template, $target, $name = null) * Create a route that only responds to POST requests. * * @param string $template The URL template to use. - * @param array $target An array describing the target route parameters. These parameters + * @param array|string $target An array describing the target route parameters. These parameters * should indicate the plugin, prefix, controller, and action that this route points to. - * @param string $name The name of the route. + * @param string|null $name The name of the route. * @return \Cake\Routing\Route\Route */ public function post($template, $target, $name = null) @@ -498,9 +497,9 @@ public function post($template, $target, $name = null) * Create a route that only responds to PUT requests. * * @param string $template The URL template to use. - * @param array $target An array describing the target route parameters. These parameters + * @param array|string $target An array describing the target route parameters. These parameters * should indicate the plugin, prefix, controller, and action that this route points to. - * @param string $name The name of the route. + * @param string|null $name The name of the route. * @return \Cake\Routing\Route\Route */ public function put($template, $target, $name = null) @@ -512,9 +511,9 @@ public function put($template, $target, $name = null) * Create a route that only responds to PATCH requests. * * @param string $template The URL template to use. - * @param array $target An array describing the target route parameters. These parameters + * @param array|string $target An array describing the target route parameters. These parameters * should indicate the plugin, prefix, controller, and action that this route points to. - * @param string $name The name of the route. + * @param string|null $name The name of the route. * @return \Cake\Routing\Route\Route */ public function patch($template, $target, $name = null) @@ -526,9 +525,9 @@ public function patch($template, $target, $name = null) * Create a route that only responds to DELETE requests. * * @param string $template The URL template to use. - * @param array $target An array describing the target route parameters. These parameters + * @param array|string $target An array describing the target route parameters. These parameters * should indicate the plugin, prefix, controller, and action that this route points to. - * @param string $name The name of the route. + * @param string|null $name The name of the route. * @return \Cake\Routing\Route\Route */ public function delete($template, $target, $name = null) @@ -540,9 +539,9 @@ public function delete($template, $target, $name = null) * Create a route that only responds to HEAD requests. * * @param string $template The URL template to use. - * @param array $target An array describing the target route parameters. These parameters + * @param array|string $target An array describing the target route parameters. These parameters * should indicate the plugin, prefix, controller, and action that this route points to. - * @param string $name The name of the route. + * @param string|null $name The name of the route. * @return \Cake\Routing\Route\Route */ public function head($template, $target, $name = null) @@ -554,9 +553,9 @@ public function head($template, $target, $name = null) * Create a route that only responds to OPTIONS requests. * * @param string $template The URL template to use. - * @param array $target An array describing the target route parameters. These parameters + * @param array|string $target An array describing the target route parameters. These parameters * should indicate the plugin, prefix, controller, and action that this route points to. - * @param string $name The name of the route. + * @param string|null $name The name of the route. * @return \Cake\Routing\Route\Route */ public function options($template, $target, $name = null) @@ -569,9 +568,9 @@ public function options($template, $target, $name = null) * * @param string $method The HTTP method name to match. * @param string $template The URL template to use. - * @param array $target An array describing the target route parameters. These parameters + * @param array|string $target An array describing the target route parameters. These parameters * should indicate the plugin, prefix, controller, and action that this route points to. - * @param string $name The name of the route. + * @param string|null $name The name of the route. * @return \Cake\Routing\Route\Route */ protected function _methodRoute($method, $template, $target, $name) @@ -946,8 +945,14 @@ public function prefix($name, $params = [], callable $callback = null) * Routes connected in the scoped collection will have the correct path segment * prepended, and have a matching plugin routing key set. * + * ### Options + * + * - `path` The path prefix to use. Defaults to `Inflector::dasherize($name)`. + * - `_namePrefix` Set a prefix used for named routes. The prefix is prepended to the + * name of any route created in a scope callback. + * * @param string $name The plugin name to build routes for - * @param array|callable $options Either the options to use, or a callback + * @param array|callable $options Either the options to use, or a callback to build routes. * @param callable|null $callback The callback to invoke that builds the plugin routes * Only required when $options is defined. * @return void @@ -958,11 +963,14 @@ public function plugin($name, $options = [], $callback = null) $callback = $options; $options = []; } - $params = ['plugin' => $name] + $this->_params; if (empty($options['path'])) { - $options['path'] = '/' . Inflector::underscore($name); + $path = '/' . Inflector::underscore($name); + } else { + $path = $options['path']; } - $this->scope($options['path'], $params, $callback); + unset($options['path']); + $params = ['plugin' => $name] + $options + $this->_params; + $this->scope($path, $params, $callback); } /** @@ -972,6 +980,11 @@ public function plugin($name, $options = [], $callback = null) * added to. This means that both the current path and parameters will be appended * to the supplied parameters. * + * ### Special Keys in $params + * + * - `_namePrefix` Set a prefix used for named routes. The prefix is prepended to the + * name of any route created in a scope callback. + * * @param string $path The path to create a scope for. * @param array|callable $params Either the parameters to add to routes, or a callback. * @param callable|null $callback The callback to invoke that builds the plugin routes. @@ -1021,8 +1034,8 @@ public function scope($path, $params, $callback = null) public function fallbacks($routeClass = null) { $routeClass = $routeClass ?: $this->_routeClass; - $this->connect('/:controller', ['action' => 'index'], compact('routeClass')); - $this->connect('/:controller/:action/*', [], compact('routeClass')); + $this->connect('/{controller}', ['action' => 'index'], compact('routeClass')); + $this->connect('/{controller}/{action}/*', [], compact('routeClass')); } /** @@ -1050,6 +1063,7 @@ public function registerMiddleware($name, $middleware) * * @param string ...$names The names of the middleware to apply to the current scope. * @return $this + * @throws \RuntimeException * @see \Cake\Routing\RouteCollection::addMiddlewareToScope() */ public function applyMiddleware(...$names) diff --git a/app/vendor/cakephp/cakephp/src/Routing/RouteCollection.php b/app/vendor/cakephp/cakephp/src/Routing/RouteCollection.php index faafc9f15..093259319 100644 --- a/app/vendor/cakephp/cakephp/src/Routing/RouteCollection.php +++ b/app/vendor/cakephp/cakephp/src/Routing/RouteCollection.php @@ -30,7 +30,6 @@ */ class RouteCollection { - /** * The routes connected to this collection. * @@ -155,7 +154,7 @@ public function parse($url, $method = '') list($url, $queryParameters) = explode('?', $url, 2); parse_str($queryParameters, $queryParameters); } - /* @var \Cake\Routing\Route\Route $route */ + /** @var \Cake\Routing\Route\Route $route */ foreach ($this->_paths[$path] as $route) { $r = $route->parse($url, $method); if ($r === false) { @@ -200,7 +199,7 @@ public function parseRequest(ServerRequestInterface $request) continue; } - /* @var \Cake\Routing\Route\Route $route */ + /** @var \Cake\Routing\Route\Route $route */ foreach ($this->_paths[$path] as $route) { $r = $route->parseRequest($request); if ($r === false) { @@ -222,7 +221,7 @@ public function parseRequest(ServerRequestInterface $request) * and newer style urls containing '_name' * * @param array $url The url to match. - * @return array The set of names of the url + * @return string[] The set of names of the url */ protected function _getNames($url) { @@ -336,7 +335,7 @@ public function match($url, $context) if (empty($this->_routeTable[$name])) { continue; } - /* @var \Cake\Routing\Route\Route $route */ + /** @var \Cake\Routing\Route\Route $route */ foreach ($this->_routeTable[$name] as $route) { $match = $route->match($url, $context); if ($match) { @@ -370,11 +369,11 @@ public function named() /** * Get/set the extensions that the route collection could handle. * - * @param null|string|array $extensions Either the list of extensions to set, + * @param string[]|string|null $extensions Either the list of extensions to set, * or null to get. * @param bool $merge Whether to merge with or override existing extensions. * Defaults to `true`. - * @return array The valid extensions. + * @return string[] The valid extensions. * @deprecated 3.5.0 Use getExtensions()/setExtensions() instead. */ public function extensions($extensions = null, $merge = true) @@ -445,6 +444,7 @@ public function registerMiddleware($name, $middleware) * @param string $name Name of the middleware group * @param string[] $middlewareNames Names of the middleware * @return $this + * @throws \RuntimeException */ public function middlewareGroup($name, array $middlewareNames) { @@ -504,6 +504,7 @@ public function middlewareExists($name) * @param string $path The URL path to register middleware for. * @param string[] $middleware The middleware names to add for the path. * @return $this + * @throws \RuntimeException */ public function applyMiddleware($path, array $middleware) { diff --git a/app/vendor/cakephp/cakephp/src/Routing/Router.php b/app/vendor/cakephp/cakephp/src/Routing/Router.php index d6953dcdf..713fbdc4a 100644 --- a/app/vendor/cakephp/cakephp/src/Routing/Router.php +++ b/app/vendor/cakephp/cakephp/src/Routing/Router.php @@ -39,7 +39,6 @@ */ class Router { - /** * Have routes been loaded * @@ -59,7 +58,7 @@ class Router * Contains the base string that will be applied to all generated URLs * For example `https://example.com` * - * @var string + * @var string|null */ protected static $_fullBaseUrl; @@ -130,7 +129,7 @@ class Router 'Month' => Router::MONTH, 'Day' => Router::DAY, 'ID' => Router::ID, - 'UUID' => Router::UUID + 'UUID' => Router::UUID, ]; /** @@ -161,7 +160,7 @@ class Router /** * Default extensions defined with Router::extensions() * - * @var array + * @var string[] */ protected static $_defaultExtensions = []; @@ -420,7 +419,7 @@ public static function setRequestInfo($request) $requestData[0] += [ 'controller' => false, 'action' => false, - 'plugin' => null + 'plugin' => null, ]; $request = new ServerRequest([ 'params' => $requestData[0], @@ -647,10 +646,10 @@ protected static function _applyUrlFilters($url) * - `_name` - Name of route. If you have setup named routes you can use this key * to specify it. * - * @param string|array|null $url An array specifying any of the following: + * @param string|array|\Psr\Http\Message\UriInterface|null $url An array specifying any of the following: * 'controller', 'action', 'plugin' additionally, you can provide routed * elements or query string parameters. If string it can be name any valid url - * string. + * string or it can be an UriInterface instance. * @param bool $full If true, the full base URL will be prepended to the result. * Default is false. * @return string Full translated URL with base path. @@ -706,7 +705,8 @@ public static function url($url = null, $full = false) if (!isset($url['_name'])) { // Copy the current action if the controller is the current one. - if (empty($url['action']) && + if ( + empty($url['action']) && (empty($url['controller']) || $params['controller'] === $url['controller']) ) { $url['action'] = $params['action']; @@ -721,7 +721,7 @@ public static function url($url = null, $full = false) 'plugin' => $params['plugin'], 'controller' => $params['controller'], 'action' => 'index', - '_ext' => null + '_ext' => null, ]; } @@ -734,6 +734,8 @@ public static function url($url = null, $full = false) $output = static::$_collection->match($url, $context); } else { + $url = (string)$url; + $plainString = ( strpos($url, 'javascript:') === 0 || strpos($url, 'mailto:') === 0 || @@ -769,7 +771,6 @@ public static function url($url = null, $full = false) * ### Usage * * @see Router::url() - * * @param string|array|null $url An array specifying any of the following: * 'controller', 'action', 'plugin' additionally, you can provide routed * elements or query string parameters. If string it can be name any valid url @@ -852,7 +853,9 @@ public static function reverseToArray($params) $params['bare'], $params['requested'], $params['return'], + $params['isAjax'], $params['_Token'], + $params['_csrfToken'], $params['_matchedRoute'], $params['_name'] ); @@ -941,10 +944,10 @@ public static function normalize($url = '/') * A string or an array of valid extensions can be passed to this method. * If called without any parameters it will return current list of set extensions. * - * @param array|string|null $extensions List of extensions to be added. + * @param string[]|string|null $extensions List of extensions to be added. * @param bool $merge Whether to merge with or override existing extensions. * Defaults to `true`. - * @return array Array of extensions Router is configured to parse. + * @return string[] Array of extensions Router is configured to parse. */ public static function extensions($extensions = null, $merge = true) { @@ -1010,7 +1013,7 @@ public static function parseNamedParams(ServerRequest $request, array $options = $arr = [$arr]; } else { $arr = [ - $match[1] => $arr + $match[1] => $arr, ]; } } diff --git a/app/vendor/cakephp/cakephp/src/Shell/CacheShell.php b/app/vendor/cakephp/cakephp/src/Shell/CacheShell.php index 8a13fee58..9f023e711 100644 --- a/app/vendor/cakephp/cakephp/src/Shell/CacheShell.php +++ b/app/vendor/cakephp/cakephp/src/Shell/CacheShell.php @@ -29,7 +29,6 @@ */ class CacheShell extends Shell { - /** * Get the option parser for this shell. * @@ -50,15 +49,15 @@ public function getOptionParser() 'description' => [ 'Clear the cache for a particular prefix.', 'For example, `cake cache clear _cake_model_` will clear the model cache', - 'Use `cake cache list_prefixes` to list available prefixes' + 'Use `cake cache list_prefixes` to list available prefixes', ], 'arguments' => [ 'prefix' => [ 'help' => 'The cache prefix to be cleared.', - 'required' => true - ] - ] - ] + 'required' => true, + ], + ], + ], ]); return $parser; diff --git a/app/vendor/cakephp/cakephp/src/Shell/CommandListShell.php b/app/vendor/cakephp/cakephp/src/Shell/CommandListShell.php index 09054ce34..c00701880 100644 --- a/app/vendor/cakephp/cakephp/src/Shell/CommandListShell.php +++ b/app/vendor/cakephp/cakephp/src/Shell/CommandListShell.php @@ -29,7 +29,6 @@ */ class CommandListShell extends Shell { - /** * Contains tasks to load and instantiate * @@ -160,10 +159,10 @@ public function getOptionParser() 'Get the list of available shells for this CakePHP application.' )->addOption('xml', [ 'help' => 'Get the listing as XML.', - 'boolean' => true + 'boolean' => true, ])->addOption('version', [ 'help' => 'Prints the currently installed version of CakePHP. (deprecated - use `cake --version` instead)', - 'boolean' => true + 'boolean' => true, ]); return $parser; diff --git a/app/vendor/cakephp/cakephp/src/Shell/CompletionShell.php b/app/vendor/cakephp/cakephp/src/Shell/CompletionShell.php index a2843322c..3a9da8d7e 100644 --- a/app/vendor/cakephp/cakephp/src/Shell/CompletionShell.php +++ b/app/vendor/cakephp/cakephp/src/Shell/CompletionShell.php @@ -23,7 +23,6 @@ */ class CompletionShell extends Shell { - /** * Contains tasks to load and instantiate * @@ -123,7 +122,7 @@ public function getOptionParser() 'help' => 'Output a list of available commands', 'parser' => [ 'description' => 'List all available', - ] + ], ])->addSubcommand('subcommands', [ 'help' => 'Output a list of available subcommands', 'parser' => [ @@ -132,9 +131,9 @@ public function getOptionParser() 'command' => [ 'help' => 'The command name', 'required' => false, - ] - ] - ] + ], + ], + ], ])->addSubcommand('options', [ 'help' => 'Output a list of available options', 'parser' => [ @@ -147,11 +146,11 @@ public function getOptionParser() 'subcommand' => [ 'help' => 'The subcommand name', 'required' => false, - ] - ] - ] + ], + ], + ], ])->addSubcommand('fuzzy', [ - 'help' => 'Guess autocomplete' + 'help' => 'Guess autocomplete', ])->setEpilog([ 'This command is not intended to be called manually', ]); diff --git a/app/vendor/cakephp/cakephp/src/Shell/Helper/ProgressHelper.php b/app/vendor/cakephp/cakephp/src/Shell/Helper/ProgressHelper.php index 9d92e5424..5522a28d4 100644 --- a/app/vendor/cakephp/cakephp/src/Shell/Helper/ProgressHelper.php +++ b/app/vendor/cakephp/cakephp/src/Shell/Helper/ProgressHelper.php @@ -33,11 +33,10 @@ */ class ProgressHelper extends Helper { - /** * The current progress. * - * @var int + * @var int|float */ protected $_progress = 0; @@ -112,7 +111,7 @@ public function init(array $args = []) /** * Increment the progress bar. * - * @param int $num The amount of progress to advance by. + * @param int|float $num The amount of progress to advance by. * @return $this */ public function increment($num = 1) @@ -134,12 +133,12 @@ public function draw() $barLen = ($this->_width - $numberLen) * ($this->_progress / $this->_total); $bar = ''; if ($barLen > 1) { - $bar = str_repeat('=', $barLen - 1) . '>'; + $bar = str_repeat('=', (int)$barLen - 1) . '>'; } $pad = ceil($this->_width - $numberLen - $barLen); if ($pad > 0) { - $bar .= str_repeat(' ', $pad); + $bar .= str_repeat(' ', (int)$pad); } $percent = ($complete * 100) . '%'; $bar .= str_pad($percent, $numberLen, ' ', STR_PAD_LEFT); diff --git a/app/vendor/cakephp/cakephp/src/Shell/Helper/TableHelper.php b/app/vendor/cakephp/cakephp/src/Shell/Helper/TableHelper.php index b8116b634..ae3edeef9 100644 --- a/app/vendor/cakephp/cakephp/src/Shell/Helper/TableHelper.php +++ b/app/vendor/cakephp/cakephp/src/Shell/Helper/TableHelper.php @@ -21,7 +21,6 @@ */ class TableHelper extends Helper { - /** * Default config for this helper. * @@ -37,7 +36,7 @@ class TableHelper extends Helper * Calculate the column widths * * @param array $rows The rows on which the columns width will be calculated on. - * @return array + * @return int[] */ protected function _calculateWidths($rows) { @@ -57,11 +56,15 @@ protected function _calculateWidths($rows) /** * Get the width of a cell exclusive of style tags. * - * @param string $text The text to calculate a width for. + * @param string|null $text The text to calculate a width for. * @return int The width of the textual content in visible characters. */ protected function _cellWidth($text) { + if ($text === null) { + return 0; + } + if (strpos($text, '<') === false && strpos($text, '>') === false) { return mb_strwidth($text); } @@ -77,7 +80,7 @@ protected function _cellWidth($text) /** * Output a row separator. * - * @param array $widths The widths of each column to output. + * @param int[] $widths The widths of each column to output. * @return void */ protected function _rowSeparator($widths) @@ -94,7 +97,7 @@ protected function _rowSeparator($widths) * Output a row. * * @param array $row The row to output. - * @param array $widths The widths of each column to output. + * @param int[] $widths The widths of each column to output. * @param array $options Options to be passed. * @return void */ diff --git a/app/vendor/cakephp/cakephp/src/Shell/I18nShell.php b/app/vendor/cakephp/cakephp/src/Shell/I18nShell.php index 4dd6e748d..5e9360eff 100644 --- a/app/vendor/cakephp/cakephp/src/Shell/I18nShell.php +++ b/app/vendor/cakephp/cakephp/src/Shell/I18nShell.php @@ -27,7 +27,6 @@ */ class I18nShell extends Shell { - /** * Contains tasks to load and instantiate * @@ -138,30 +137,30 @@ public function getOptionParser() 'options' => [ 'plugin' => [ 'help' => 'Plugin name.', - 'short' => 'p' + 'short' => 'p', ], 'force' => [ 'help' => 'Force overwriting.', 'short' => 'f', - 'boolean' => true - ] + 'boolean' => true, + ], ], 'arguments' => [ 'language' => [ - 'help' => 'Two-letter language code.' - ] - ] + 'help' => 'Two-letter language code.', + ], + ], ]; $parser->setDescription( 'I18n Shell generates .pot files(s) with translations.' )->addSubcommand('extract', [ 'help' => 'Extract the po translations from your application', - 'parser' => $this->Extract->getOptionParser() + 'parser' => $this->Extract->getOptionParser(), ]) ->addSubcommand('init', [ 'help' => 'Init PO language file from POT file', - 'parser' => $initParser + 'parser' => $initParser, ]); return $parser; diff --git a/app/vendor/cakephp/cakephp/src/Shell/OrmCacheShell.php b/app/vendor/cakephp/cakephp/src/Shell/OrmCacheShell.php index 7d4448258..03762e553 100644 --- a/app/vendor/cakephp/cakephp/src/Shell/OrmCacheShell.php +++ b/app/vendor/cakephp/cakephp/src/Shell/OrmCacheShell.php @@ -27,5 +27,4 @@ */ class OrmCacheShell extends SchemaCacheShell { - } diff --git a/app/vendor/cakephp/cakephp/src/Shell/PluginShell.php b/app/vendor/cakephp/cakephp/src/Shell/PluginShell.php index 3236a956c..402dc713c 100644 --- a/app/vendor/cakephp/cakephp/src/Shell/PluginShell.php +++ b/app/vendor/cakephp/cakephp/src/Shell/PluginShell.php @@ -26,7 +26,6 @@ */ class PluginShell extends Shell { - /** * Tasks to load * @@ -61,7 +60,7 @@ public function getOptionParser() $parser->setDescription('Plugin Shell perform various tasks related to plugin.') ->addSubcommand('assets', [ 'help' => 'Symlink / copy plugin assets to app\'s webroot', - 'parser' => $this->Assets->getOptionParser() + 'parser' => $this->Assets->getOptionParser(), ]) ->addSubcommand('loaded', [ 'help' => 'Lists all loaded plugins', diff --git a/app/vendor/cakephp/cakephp/src/Shell/RoutesShell.php b/app/vendor/cakephp/cakephp/src/Shell/RoutesShell.php index 00eb608fc..9f1f736c0 100644 --- a/app/vendor/cakephp/cakephp/src/Shell/RoutesShell.php +++ b/app/vendor/cakephp/cakephp/src/Shell/RoutesShell.php @@ -17,6 +17,7 @@ use Cake\Console\Shell; use Cake\Http\ServerRequest; use Cake\Routing\Exception\MissingRouteException; +use Cake\Routing\Exception\RedirectException; use Cake\Routing\Router; /** @@ -24,7 +25,6 @@ */ class RoutesShell extends Shell { - /** * Override main() to handle action * Displays all routes in an application. @@ -34,7 +34,7 @@ class RoutesShell extends Shell public function main() { $output = [ - ['Route name', 'URI template', 'Defaults'] + ['Route name', 'URI template', 'Defaults'], ]; foreach (Router::routes() as $route) { $name = isset($route->options['_name']) ? $route->options['_name'] : $route->getName(); @@ -69,7 +69,14 @@ public function check($url) $output = [ ['Route name', 'URI template', 'Defaults'], - [$name, $url, json_encode($route)] + [$name, $url, json_encode($route)], + ]; + $this->helper('table')->output($output); + $this->out(); + } catch (RedirectException $e) { + $output = [ + ['URI template', 'Redirect'], + [$url, $e->getMessage()], ]; $this->helper('table')->output($output); $this->out(); @@ -87,6 +94,7 @@ public function check($url) * Generate a URL based on a set of parameters * * Takes variadic arguments of key/value pairs. + * * @return bool Success */ public function generate() @@ -119,12 +127,12 @@ public function getOptionParser() 'This tool also lets you test URL generation and URL parsing.' )->addSubcommand('check', [ 'help' => 'Check a URL string against the routes. ' . - 'Will output the routing parameters the route resolves to.' + 'Will output the routing parameters the route resolves to.', ])->addSubcommand('generate', [ 'help' => 'Check a routing array against the routes. ' . "Will output the URL if there is a match.\n\n" . 'Routing parameters should be supplied in a key:value format. ' . - 'For example `controller:Articles action:view 2`' + 'For example `controller:Articles action:view 2`', ]); return $parser; diff --git a/app/vendor/cakephp/cakephp/src/Shell/SchemaCacheShell.php b/app/vendor/cakephp/cakephp/src/Shell/SchemaCacheShell.php index 61eea2fe0..b9b2658de 100644 --- a/app/vendor/cakephp/cakephp/src/Shell/SchemaCacheShell.php +++ b/app/vendor/cakephp/cakephp/src/Shell/SchemaCacheShell.php @@ -30,7 +30,6 @@ */ class SchemaCacheShell extends Shell { - /** * Build metadata. * diff --git a/app/vendor/cakephp/cakephp/src/Shell/ServerShell.php b/app/vendor/cakephp/cakephp/src/Shell/ServerShell.php index 67b7ac3f2..91d978b35 100644 --- a/app/vendor/cakephp/cakephp/src/Shell/ServerShell.php +++ b/app/vendor/cakephp/cakephp/src/Shell/ServerShell.php @@ -23,7 +23,6 @@ */ class ServerShell extends Shell { - /** * Default ServerHost * @@ -74,7 +73,7 @@ class ServerShell extends Shell * or otherwise modify the pre-command flow. * * @return void - * @link https://book.cakephp.org/3.0/en/console-and-shells.html#hook-methods + * @link https://book.cakephp.org/3/en/console-and-shells.html#hook-methods */ public function startup() { @@ -164,16 +163,16 @@ public function getOptionParser() '[WARN] Don\'t use this in a production environment', ])->addOption('host', [ 'short' => 'H', - 'help' => 'ServerHost' + 'help' => 'ServerHost', ])->addOption('port', [ 'short' => 'p', - 'help' => 'ListenPort' + 'help' => 'ListenPort', ])->addOption('ini_path', [ 'short' => 'I', - 'help' => 'php.ini path' + 'help' => 'php.ini path', ])->addOption('document_root', [ 'short' => 'd', - 'help' => 'DocumentRoot' + 'help' => 'DocumentRoot', ]); return $parser; diff --git a/app/vendor/cakephp/cakephp/src/Shell/Task/AssetsTask.php b/app/vendor/cakephp/cakephp/src/Shell/Task/AssetsTask.php index 23fd28021..9f26183a6 100644 --- a/app/vendor/cakephp/cakephp/src/Shell/Task/AssetsTask.php +++ b/app/vendor/cakephp/cakephp/src/Shell/Task/AssetsTask.php @@ -24,7 +24,6 @@ */ class AssetsTask extends Shell { - /** * Attempt to symlink plugin assets to app's webroot. If symlinking fails it * fallbacks to copying the assets. For vendor namespaced plugin, parent folder @@ -123,7 +122,7 @@ protected function _list($name = null) 'srcPath' => Plugin::path($plugin) . 'webroot', 'destDir' => $dir, 'link' => $link, - 'namespaced' => $namespaced + 'namespaced' => $namespaced, ]; } @@ -147,7 +146,8 @@ protected function _process($plugins, $copy = false, $overwrite = false) $this->out('For plugin: ' . $plugin); $this->hr(); - if ($config['namespaced'] && + if ( + $config['namespaced'] && !is_dir($config['destDir']) && !$this->_createDirectory($config['destDir']) ) { @@ -320,18 +320,18 @@ public function getOptionParser() $parser = parent::getOptionParser(); $parser->addSubcommand('symlink', [ - 'help' => 'Symlink (copy as fallback) plugin assets to app\'s webroot.' + 'help' => 'Symlink (copy as fallback) plugin assets to app\'s webroot.', ])->addSubcommand('copy', [ - 'help' => 'Copy plugin assets to app\'s webroot.' + 'help' => 'Copy plugin assets to app\'s webroot.', ])->addSubcommand('remove', [ - 'help' => 'Remove plugin assets from app\'s webroot.' + 'help' => 'Remove plugin assets from app\'s webroot.', ])->addArgument('name', [ 'help' => 'A specific plugin you want to symlink assets for.', 'optional' => true, ])->addOption('overwrite', [ 'help' => 'Overwrite existing symlink / folder / files.', 'default' => false, - 'boolean' => true + 'boolean' => true, ]); return $parser; diff --git a/app/vendor/cakephp/cakephp/src/Shell/Task/CommandTask.php b/app/vendor/cakephp/cakephp/src/Shell/Task/CommandTask.php index e45281b82..5bc80a06c 100644 --- a/app/vendor/cakephp/cakephp/src/Shell/Task/CommandTask.php +++ b/app/vendor/cakephp/cakephp/src/Shell/Task/CommandTask.php @@ -28,7 +28,6 @@ */ class CommandTask extends Shell { - /** * Gets the shell command listing. * @@ -82,9 +81,9 @@ protected function _findShells($shellList, $path, $key, $skip) * Scan the provided paths for shells, and append them into $shellList * * @param string $type The type of object. - * @param array $shells The shell name. + * @param string[] $shells The shell names. * @param array $shellList List of shells. - * @param array $skip List of command names to skip. + * @param string[] $skip List of command names to skip. * @return array The updated $shellList */ protected function _appendShells($type, $shells, $shellList, $skip) @@ -145,7 +144,8 @@ public function commands() foreach ($shellList as $type => $commands) { foreach ($commands as $shell) { $prefix = ''; - if (!in_array(strtolower($type), ['app', 'core']) && + if ( + !in_array(strtolower($type), ['app', 'core']) && isset($duplicates[$type]) && in_array($shell, $duplicates[$type]) ) { @@ -202,7 +202,7 @@ public function subCommands($commandName) * Get Shell instance for the given command * * @param string $commandName The command you want. - * @return \Cake\Console\Shell|bool Shell instance if the command can be found, false otherwise. + * @return \Cake\Console\Shell|false Shell instance if the command can be found, false otherwise. */ public function getShell($commandName) { @@ -238,7 +238,7 @@ public function getShell($commandName) return false; } - /* @var \Cake\Console\Shell $Shell */ + /** @var \Cake\Console\Shell $Shell */ $Shell = new $class(); $Shell->plugin = trim($pluginDot, '.'); $Shell->initialize(); @@ -275,7 +275,7 @@ public function options($commandName, $subCommandName = '') $options = []; $array = $parser->options(); - /* @var \Cake\Console\ConsoleInputOption $obj */ + /** @var \Cake\Console\ConsoleInputOption $obj */ foreach ($array as $name => $obj) { $options[] = "--$name"; $short = $obj->short(); diff --git a/app/vendor/cakephp/cakephp/src/Shell/Task/ExtractTask.php b/app/vendor/cakephp/cakephp/src/Shell/Task/ExtractTask.php index c182bab97..dd7c823c4 100644 --- a/app/vendor/cakephp/cakephp/src/Shell/Task/ExtractTask.php +++ b/app/vendor/cakephp/cakephp/src/Shell/Task/ExtractTask.php @@ -27,7 +27,6 @@ */ class ExtractTask extends Shell { - /** * Paths to use when looking for strings * @@ -114,12 +113,14 @@ class ExtractTask extends Shell /** * Displays marker error(s) if true + * * @var bool */ protected $_markerError; /** * Count number of marker errors found + * * @var bool */ protected $_countMarkerError = 0; @@ -286,7 +287,7 @@ protected function _addTranslation($domain, $msgid, $details = []) if (empty($this->_translations[$domain][$msgid][$context])) { $this->_translations[$domain][$msgid][$context] = [ - 'msgid_plural' => false + 'msgid_plural' => false, ]; } @@ -342,24 +343,24 @@ public function getOptionParser() $parser->setDescription( 'CakePHP Language String Extraction:' )->addOption('app', [ - 'help' => 'Directory where your application is located.' + 'help' => 'Directory where your application is located.', ])->addOption('paths', [ - 'help' => 'Comma separated list of paths.' + 'help' => 'Comma separated list of paths.', ])->addOption('merge', [ 'help' => 'Merge all domain strings into the default.po file.', - 'choices' => ['yes', 'no'] + 'choices' => ['yes', 'no'], ])->addOption('relative-paths', [ 'help' => 'Use relative paths in the .pot file', 'boolean' => true, 'default' => false, ])->addOption('output', [ - 'help' => 'Full path to output directory.' + 'help' => 'Full path to output directory.', ])->addOption('files', [ - 'help' => 'Comma separated list of files.' + 'help' => 'Comma separated list of files.', ])->addOption('exclude-plugins', [ 'boolean' => true, 'default' => true, - 'help' => 'Ignores all files in plugins if this command is run inside from the same app directory.' + 'help' => 'Ignores all files in plugins if this command is run inside from the same app directory.', ])->addOption('plugin', [ 'help' => 'Extracts tokens only from the plugin specified and puts the result in the plugin\'s Locale directory.', 'short' => 'p', @@ -368,19 +369,19 @@ public function getOptionParser() 'default' => false, 'help' => 'Ignores validation messages in the $validate property.' . ' If this flag is not set and the command is run from the same app directory,' . - ' all messages in model validation rules will be extracted as tokens.' + ' all messages in model validation rules will be extracted as tokens.', ])->addOption('validation-domain', [ - 'help' => 'If set to a value, the localization domain to be used for model validation messages.' + 'help' => 'If set to a value, the localization domain to be used for model validation messages.', ])->addOption('exclude', [ 'help' => 'Comma separated list of directories to exclude.' . - ' Any path containing a path segment with the provided values will be skipped. E.g. test,vendors' + ' Any path containing a path segment with the provided values will be skipped. E.g. test,vendors', ])->addOption('overwrite', [ 'boolean' => true, 'default' => false, - 'help' => 'Always overwrite existing .pot files.' + 'help' => 'Always overwrite existing .pot files.', ])->addOption('extract-core', [ 'help' => 'Extract messages from the CakePHP core libs.', - 'choices' => ['yes', 'no'] + 'choices' => ['yes', 'no'], ])->addOption('no-location', [ 'boolean' => true, 'default' => false, @@ -602,12 +603,14 @@ protected function _store($domain, $header, $sentence) */ protected function _writeFiles() { + $this->out(); $overwriteAll = false; if (!empty($this->params['overwrite'])) { $overwriteAll = true; } foreach ($this->_storage as $domain => $sentences) { $output = $this->_writeHeader(); + $headerLength = strlen($output); foreach ($sentences as $sentence => $header) { $output .= $header . $sentence; } @@ -620,6 +623,13 @@ protected function _writeFiles() $filename = str_replace('/', '_', $domain) . '.pot'; $File = new File($this->_output . $filename); + + if ($File->exists() && $this->_checkUnchanged($File, $headerLength, $output) === true) { + $this->out($filename . ' is unchanged. Skipping.'); + $File->close(); + continue; + } + $response = ''; while ($overwriteAll === false && $File->exists() && strtoupper($response) !== 'Y') { $this->out(); @@ -670,6 +680,26 @@ protected function _writeHeader() return $output; } + /** + * Check whether the old and new output are the same, thus unchanged + * + * Compares the sha1 hashes of the old and new file without header. + * + * @param File $oldFile The existing file. + * @param int $headerLength The length of the file header in bytes. + * @param string $newFileContent The content of the new file. + * @return bool Whether or not the old and new file are unchanged. + */ + protected function _checkUnchanged(File $oldFile, $headerLength, $newFileContent) + { + $oldFileContent = $oldFile->read(); + + $oldChecksum = sha1(substr($oldFileContent, $headerLength)); + $newChecksum = sha1(substr($newFileContent, $headerLength)); + + return $oldChecksum === $newChecksum; + } + /** * Get the strings from the position forward * diff --git a/app/vendor/cakephp/cakephp/src/Shell/Task/LoadTask.php b/app/vendor/cakephp/cakephp/src/Shell/Task/LoadTask.php index 8fc005dd2..3c11c70ec 100644 --- a/app/vendor/cakephp/cakephp/src/Shell/Task/LoadTask.php +++ b/app/vendor/cakephp/cakephp/src/Shell/Task/LoadTask.php @@ -22,7 +22,6 @@ */ class LoadTask extends Shell { - /** * Path to the bootstrap file. * diff --git a/app/vendor/cakephp/cakephp/src/Shell/Task/UnloadTask.php b/app/vendor/cakephp/cakephp/src/Shell/Task/UnloadTask.php index 6139e7119..9904fa816 100644 --- a/app/vendor/cakephp/cakephp/src/Shell/Task/UnloadTask.php +++ b/app/vendor/cakephp/cakephp/src/Shell/Task/UnloadTask.php @@ -22,7 +22,6 @@ */ class UnloadTask extends Shell { - /** * Path to the bootstrap file. * diff --git a/app/vendor/cakephp/cakephp/src/Template/Element/plugin_class_error.ctp b/app/vendor/cakephp/cakephp/src/Template/Element/plugin_class_error.ctp index fe52e5110..a8a9d350e 100644 --- a/app/vendor/cakephp/cakephp/src/Template/Element/plugin_class_error.ctp +++ b/app/vendor/cakephp/cakephp/src/Template/Element/plugin_class_error.ctp @@ -25,8 +25,8 @@ if (!Plugin::isLoaded($plugin)): else: echo sprintf('Make sure your plugin was loaded from %s and Composer is able to autoload its classes, see %s and %s', 'config' . DIRECTORY_SEPARATOR . 'bootstrap.php', - 'Loading a plugin', - 'Plugins - autoloading plugin classes' + 'Loading a plugin', + 'Plugins - autoloading plugin classes' ); endif; diff --git a/app/vendor/cakephp/cakephp/src/Template/Layout/dev_error.ctp b/app/vendor/cakephp/cakephp/src/Template/Layout/dev_error.ctp index c747fd7f0..f62bf42e4 100644 --- a/app/vendor/cakephp/cakephp/src/Template/Layout/dev_error.ctp +++ b/app/vendor/cakephp/cakephp/src/Template/Layout/dev_error.ctp @@ -205,7 +205,7 @@ diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/ConsoleIntegrationTestTrait.php b/app/vendor/cakephp/cakephp/src/TestSuite/ConsoleIntegrationTestTrait.php index 9dd15475b..1fc0837fe 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/ConsoleIntegrationTestTrait.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/ConsoleIntegrationTestTrait.php @@ -26,6 +26,7 @@ use Cake\TestSuite\Constraint\Console\ExitCode; use Cake\TestSuite\Stub\ConsoleInput; use Cake\TestSuite\Stub\ConsoleOutput; +use Cake\TestSuite\Stub\MissingConsoleInputException; /** * A test case class intended to make integration tests of cake console commands @@ -88,6 +89,12 @@ public function exec($command, array $input = []) try { $this->_exitCode = $runner->run($args, $io); + } catch (MissingConsoleInputException $e) { + $messages = $this->_out->messages(); + if (count($messages)) { + $e->setQuestion($messages[count($messages) - 1]); + } + throw $e; } catch (StopException $exception) { $this->_exitCode = $exception->getCode(); } diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Console/ContentsBase.php b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Console/ContentsBase.php index 4b4818604..c508d5ee9 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Console/ContentsBase.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Console/ContentsBase.php @@ -22,7 +22,6 @@ */ abstract class ContentsBase extends Constraint { - /** * @var string */ @@ -36,7 +35,7 @@ abstract class ContentsBase extends Constraint /** * Constructor * - * @param int $contents Contents + * @param array $contents Contents * @param string $output Output type */ public function __construct($contents, $output) diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Console/ContentsContain.php b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Console/ContentsContain.php index c51873852..e1cee959c 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Console/ContentsContain.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Console/ContentsContain.php @@ -20,7 +20,6 @@ */ class ContentsContain extends ContentsBase { - /** * Checks if contents contain expected * diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Console/ContentsContainRow.php b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Console/ContentsContainRow.php index e73bb2019..a9dabc3f9 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Console/ContentsContainRow.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Console/ContentsContainRow.php @@ -20,7 +20,6 @@ */ class ContentsContainRow extends ContentsRegExp { - /** * Checks if contents contain expected * @@ -54,6 +53,6 @@ public function toString() */ public function failureDescription($other) { - return $this->exporter->shortenedExport($other) . ' ' . $this->toString(); + return '`' . $this->exporter->shortenedExport($other) . '` ' . $this->toString(); } } diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Console/ContentsEmpty.php b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Console/ContentsEmpty.php index e9bccc440..5b4d05e50 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Console/ContentsEmpty.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Console/ContentsEmpty.php @@ -20,7 +20,6 @@ */ class ContentsEmpty extends ContentsBase { - /** * Checks if contents are empty * diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Console/ContentsNotContain.php b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Console/ContentsNotContain.php index 22e066b29..2cc3b7a78 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Console/ContentsNotContain.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Console/ContentsNotContain.php @@ -20,7 +20,6 @@ */ class ContentsNotContain extends ContentsBase { - /** * Checks if contents contain expected * diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Console/ContentsRegExp.php b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Console/ContentsRegExp.php index 44b5690ce..636e29fd0 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Console/ContentsRegExp.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Console/ContentsRegExp.php @@ -20,7 +20,6 @@ */ class ContentsRegExp extends ContentsBase { - /** * Checks if contents contain expected * @@ -48,6 +47,6 @@ public function toString() */ public function failureDescription($other) { - return $other . ' ' . $this->toString(); + return '`' . $other . '` ' . $this->toString(); } } diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Console/ExitCode.php b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Console/ExitCode.php index c7bcd927f..5635d18f7 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Console/ExitCode.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Console/ExitCode.php @@ -22,7 +22,6 @@ */ class ExitCode extends Constraint { - /** * @var int */ diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Email/MailConstraintBase.php b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Email/MailConstraintBase.php index 356f2e320..157fea3e0 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Email/MailConstraintBase.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Email/MailConstraintBase.php @@ -24,7 +24,9 @@ */ abstract class MailConstraintBase extends Constraint { - + /** + * @var int|null + */ protected $at; /** @@ -48,7 +50,7 @@ public function getEmails() { $emails = TestEmailTransport::getEmails(); - if ($this->at) { + if ($this->at !== null) { if (!isset($emails[$this->at])) { return []; } diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Email/MailContains.php b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Email/MailContains.php index a4a4e55ae..5269c270c 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Email/MailContains.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Email/MailContains.php @@ -21,7 +21,6 @@ */ class MailContains extends MailConstraintBase { - /** * Mail type to check contents of * diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Email/MailContainsAttachment.php b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Email/MailContainsAttachment.php new file mode 100644 index 000000000..54b1c3d8d --- /dev/null +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Email/MailContainsAttachment.php @@ -0,0 +1,76 @@ +getEmails(); + foreach ($messages as $message) { + foreach ($message->getAttachments() as $filename => $fileInfo) { + if ($filename === $expectedFilename && empty($expectedFileInfo)) { + return true; + } + if (!empty($expectedFileInfo) && array_intersect($expectedFileInfo, $fileInfo) === $expectedFileInfo) { + return true; + } + } + } + + return false; + } + + /** + * Assertion message string + * + * @return string + */ + public function toString() + { + if ($this->at) { + return sprintf('is an attachment of email #%d', $this->at); + } + + return 'is an attachment of an email'; + } + + /** + * Overwrites the descriptions so we can remove the automatic "expected" message + * + * @param mixed $other Value + * @return string + */ + protected function failureDescription($other) + { + list($expectedFilename) = $other; + + return '\'' . $expectedFilename . '\' ' . $this->toString(); + } +} diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Email/MailContainsHtml.php b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Email/MailContainsHtml.php index ff87bfb2d..ef9bba312 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Email/MailContainsHtml.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Email/MailContainsHtml.php @@ -23,6 +23,9 @@ */ class MailContainsHtml extends MailContains { + /** + * @inheritDoc + */ protected $type = Email::MESSAGE_HTML; /** diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Email/MailContainsText.php b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Email/MailContainsText.php index 1e1d773ec..4244ffa8e 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Email/MailContainsText.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Email/MailContainsText.php @@ -23,6 +23,9 @@ */ class MailContainsText extends MailContains { + /** + * @inheritDoc + */ protected $type = Email::MESSAGE_TEXT; /** diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Email/MailCount.php b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Email/MailCount.php index 34f02e5c4..c49beb5e8 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Email/MailCount.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Email/MailCount.php @@ -21,7 +21,6 @@ */ class MailCount extends MailConstraintBase { - /** * Checks constraint * diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Email/MailSentFrom.php b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Email/MailSentFrom.php index 7ddb6e0a7..d23a2e158 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Email/MailSentFrom.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Email/MailSentFrom.php @@ -21,6 +21,9 @@ */ class MailSentFrom extends MailSentWith { + /** + * @inheritDoc + */ protected $method = 'from'; /** diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Email/MailSentTo.php b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Email/MailSentTo.php index 910903fee..a9dc6eefd 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Email/MailSentTo.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Email/MailSentTo.php @@ -21,6 +21,9 @@ */ class MailSentTo extends MailSentWith { + /** + * @inheritDoc + */ protected $method = 'to'; /** diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Email/MailSentWith.php b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Email/MailSentWith.php index dc785026b..f141b5f4b 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Email/MailSentWith.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Email/MailSentWith.php @@ -21,6 +21,9 @@ */ class MailSentWith extends MailConstraintBase { + /** + * @var string + */ protected $method; /** @@ -48,11 +51,15 @@ public function matches($other) { $emails = $this->getEmails(); foreach ($emails as $email) { - $value = $email->{'get' . ucfirst($this->method)}(); - if (in_array($this->method, ['to', 'cc', 'bcc', 'from']) && isset($value[$other])) { + $value = $this->getValue($email); + if ($value === $other) { return true; } - if ($value === $other) { + if ( + !is_array($other) + && in_array($this->method, ['to', 'cc', 'bcc', 'from']) + && array_key_exists($other, $value) + ) { return true; } } @@ -60,6 +67,22 @@ public function matches($other) return false; } + /** + * Read a value from the email + * + * @param \Cake\Mailer\Email $email The email to read properties from. + * @return mixed + */ + protected function getValue($email) + { + $viewBuilderMethods = ['template', 'layout', 'helpers', 'theme']; + if (in_array($this->method, $viewBuilderMethods, true)) { + return $email->viewBuilder()->{'get' . ucfirst($this->method)}(); + } + + return $email->{'get' . ucfirst($this->method)}(); + } + /** * Assertion message string * diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Email/NoMailSent.php b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Email/NoMailSent.php index 29aa08a49..159a9c6fa 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Email/NoMailSent.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Email/NoMailSent.php @@ -21,7 +21,6 @@ */ class NoMailSent extends MailConstraintBase { - /** * Checks constraint * diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/EventFiredWith.php b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/EventFiredWith.php index 966325af0..d8dc42265 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/EventFiredWith.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/EventFiredWith.php @@ -83,7 +83,7 @@ public function matches($other) throw new AssertionFailedError(sprintf('Event "%s" was fired %d times, cannot make data assertion', $other, count($events))); } - /* @var \Cake\Event\Event $event */ + /** @var \Cake\Event\Event $event */ $event = $events[0]; if (array_key_exists($this->_dataKey, $event->getData()) === false) { diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/BodyContains.php b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/BodyContains.php index 0b753952f..6ab1669f9 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/BodyContains.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/BodyContains.php @@ -22,7 +22,6 @@ */ class BodyContains extends ResponseBase { - /** * @var bool */ diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/BodyEmpty.php b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/BodyEmpty.php index a0c0c4140..77eed2c03 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/BodyEmpty.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/BodyEmpty.php @@ -20,7 +20,6 @@ */ class BodyEmpty extends ResponseBase { - /** * Checks assertion * diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/BodyEquals.php b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/BodyEquals.php index df817b6cb..1e785a9c0 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/BodyEquals.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/BodyEquals.php @@ -20,7 +20,6 @@ */ class BodyEquals extends ResponseBase { - /** * Checks assertion * diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/BodyNotContains.php b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/BodyNotContains.php index 281f963ad..a71f5f8d3 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/BodyNotContains.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/BodyNotContains.php @@ -20,7 +20,6 @@ */ class BodyNotContains extends BodyContains { - /** * Checks assertion * diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/BodyNotEmpty.php b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/BodyNotEmpty.php index 16a64e900..a25decd68 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/BodyNotEmpty.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/BodyNotEmpty.php @@ -20,7 +20,6 @@ */ class BodyNotEmpty extends BodyEmpty { - /** * Checks assertion * diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/BodyNotEquals.php b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/BodyNotEquals.php index 3309224c5..a175b5d41 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/BodyNotEquals.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/BodyNotEquals.php @@ -20,7 +20,6 @@ */ class BodyNotEquals extends BodyEquals { - /** * Checks assertion * diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/BodyNotRegExp.php b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/BodyNotRegExp.php index 0c5095baa..db222e3a9 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/BodyNotRegExp.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/BodyNotRegExp.php @@ -20,7 +20,6 @@ */ class BodyNotRegExp extends BodyRegExp { - /** * Checks assertion * diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/BodyRegExp.php b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/BodyRegExp.php index f091eca7b..4527091e0 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/BodyRegExp.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/BodyRegExp.php @@ -20,7 +20,6 @@ */ class BodyRegExp extends ResponseBase { - /** * Checks assertion * @@ -48,6 +47,6 @@ public function toString() */ public function failureDescription($other) { - return $other . ' ' . $this->toString(); + return '`' . $other . '`' . ' ' . $this->toString(); } } diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/ContentType.php b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/ContentType.php index 29d5f39f2..b166f66df 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/ContentType.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/ContentType.php @@ -20,7 +20,6 @@ */ class ContentType extends ResponseBase { - /** * Checks assertion * @@ -44,6 +43,6 @@ public function matches($other) */ public function toString() { - return 'was set as the Content-Type'; + return 'is set as the Content-Type (`' . $this->response->getType() . '`)'; } } diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/CookieEncryptedEquals.php b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/CookieEncryptedEquals.php index 660f42b27..a0e055d03 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/CookieEncryptedEquals.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/CookieEncryptedEquals.php @@ -72,7 +72,7 @@ public function matches($other) */ public function toString() { - return sprintf('was encrypted in cookie \'%s\'', $this->cookieName); + return sprintf('is encrypted in cookie \'%s\'', $this->cookieName); } /** diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/CookieEquals.php b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/CookieEquals.php index 5a69a9911..cbe7684a8 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/CookieEquals.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/CookieEquals.php @@ -60,6 +60,6 @@ public function matches($other) */ public function toString() { - return sprintf('was in cookie \'%s\'', $this->cookieName); + return sprintf('is in cookie \'%s\'', $this->cookieName); } } diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/CookieNotSet.php b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/CookieNotSet.php index 6b041ad54..1b2d30a66 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/CookieNotSet.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/CookieNotSet.php @@ -20,7 +20,6 @@ */ class CookieNotSet extends CookieSet { - /** * Checks assertion * @@ -39,6 +38,6 @@ public function matches($other) */ public function toString() { - return 'cookie was not set'; + return 'cookie is not set'; } } diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/CookieSet.php b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/CookieSet.php index 691032020..5b4783a54 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/CookieSet.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/CookieSet.php @@ -20,7 +20,6 @@ */ class CookieSet extends ResponseBase { - /** * Checks assertion * @@ -41,6 +40,6 @@ public function matches($other) */ public function toString() { - return 'cookie was set'; + return 'cookie is set'; } } diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/FileSent.php b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/FileSent.php index d0e1ddc3d..1ddeda3fd 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/FileSent.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/FileSent.php @@ -20,7 +20,6 @@ */ class FileSent extends ResponseBase { - /** * Checks assertion * diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/FileSentAs.php b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/FileSentAs.php index f1bd05234..0dbd5b7f6 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/FileSentAs.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/FileSentAs.php @@ -20,7 +20,6 @@ */ class FileSentAs extends ResponseBase { - /** * Checks assertion * diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/HeaderContains.php b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/HeaderContains.php index ddde398e9..39cd80974 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/HeaderContains.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/HeaderContains.php @@ -20,7 +20,6 @@ */ class HeaderContains extends HeaderEquals { - /** * Checks assertion * @@ -39,6 +38,6 @@ public function matches($other) */ public function toString() { - return sprintf('is in header \'%s\'', $this->headerName); + return sprintf('is in header \'%s\' (`%s`)', $this->headerName, $this->response->getHeaderLine($this->headerName)); } } diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/HeaderEquals.php b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/HeaderEquals.php index 387e975ea..f3ded3130 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/HeaderEquals.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/HeaderEquals.php @@ -58,6 +58,8 @@ public function matches($other) */ public function toString() { - return sprintf('equals content in header \'%s\'', $this->headerName); + $responseHeader = $this->response->getHeaderLine($this->headerName); + + return sprintf('equals content in header \'%s\' (`%s`)', $this->headerName, $responseHeader); } } diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/HeaderNotContains.php b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/HeaderNotContains.php index 1851cff49..132acee71 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/HeaderNotContains.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/HeaderNotContains.php @@ -20,7 +20,6 @@ */ class HeaderNotContains extends HeaderContains { - /** * Checks assertion * @@ -39,6 +38,6 @@ public function matches($other) */ public function toString() { - return sprintf("is not in header '%s'", $this->headerName); + return sprintf("is not in header '%s' (`%s`)", $this->headerName, $this->response->getHeaderLine($this->headerName)); } } diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/ResponseBase.php b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/ResponseBase.php index e05bb3880..3427bf3c9 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/ResponseBase.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/ResponseBase.php @@ -23,7 +23,6 @@ */ abstract class ResponseBase extends Constraint { - /** * @var \Cake\Http\Response */ diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/StatusCode.php b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/StatusCode.php index 624c4c385..a4f385169 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/StatusCode.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/StatusCode.php @@ -20,7 +20,6 @@ */ class StatusCode extends StatusCodeBase { - /** * Assertion message * @@ -28,7 +27,7 @@ class StatusCode extends StatusCodeBase */ public function toString() { - return sprintf('matches response status code %d', $this->response->getStatusCode()); + return sprintf('matches response status code `%d`', $this->response->getStatusCode()); } /** @@ -39,6 +38,6 @@ public function toString() */ public function failureDescription($other) { - return $other . ' ' . $this->toString(); + return '`' . $other . '` ' . $this->toString(); } } diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/StatusCodeBase.php b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/StatusCodeBase.php index 4542867f9..4f61292ee 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/StatusCodeBase.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/StatusCodeBase.php @@ -20,7 +20,6 @@ */ abstract class StatusCodeBase extends ResponseBase { - /** * @var int|array */ diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/StatusError.php b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/StatusError.php index b1ff484b7..12ccca60a 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/StatusError.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/StatusError.php @@ -20,7 +20,9 @@ */ class StatusError extends StatusCodeBase { - + /** + * @inheritDoc + */ protected $code = [400, 429]; /** diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/StatusFailure.php b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/StatusFailure.php index 588ba1251..218d6f901 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/StatusFailure.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/StatusFailure.php @@ -20,7 +20,9 @@ */ class StatusFailure extends StatusCodeBase { - + /** + * @inheritDoc + */ protected $code = [500, 505]; /** diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/StatusOk.php b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/StatusOk.php index d8a60f6fa..b02d15e72 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/StatusOk.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/StatusOk.php @@ -20,7 +20,9 @@ */ class StatusOk extends StatusCodeBase { - + /** + * @inheritDoc + */ protected $code = [200, 204]; /** diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/StatusSuccess.php b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/StatusSuccess.php index 4ffcc07a5..de16ed6dd 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/StatusSuccess.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Response/StatusSuccess.php @@ -20,7 +20,9 @@ */ class StatusSuccess extends StatusCodeBase { - + /** + * @inheritDoc + */ protected $code = [200, 308]; /** diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Session/FlashParamEquals.php b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Session/FlashParamEquals.php index e2a5e2200..305e6d304 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Session/FlashParamEquals.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Session/FlashParamEquals.php @@ -23,7 +23,6 @@ */ class FlashParamEquals extends Constraint { - /** * @var \Cake\Http\Session */ @@ -101,9 +100,9 @@ public function matches($other) public function toString() { if ($this->at !== null) { - return sprintf('was in \'%s\' %s #%d', $this->key, $this->param, $this->at); + return sprintf('is in \'%s\' %s #%d', $this->key, $this->param, $this->at); } - return sprintf('was in \'%s\' %s', $this->key, $this->param); + return sprintf('is in \'%s\' %s', $this->key, $this->param); } } diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Session/SessionEquals.php b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Session/SessionEquals.php index 4ed4840eb..81eb5ebd5 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Session/SessionEquals.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Session/SessionEquals.php @@ -23,7 +23,6 @@ */ class SessionEquals extends Constraint { - /** * @var \Cake\Http\Session */ diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/View/LayoutFileEquals.php b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/View/LayoutFileEquals.php index 3428b8789..ff3e2ce0b 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/View/LayoutFileEquals.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/View/LayoutFileEquals.php @@ -20,7 +20,6 @@ */ class LayoutFileEquals extends TemplateFileEquals { - /** * Assertion message * @@ -28,6 +27,6 @@ class LayoutFileEquals extends TemplateFileEquals */ public function toString() { - return sprintf('equals layout file %s', $this->filename); + return sprintf('equals layout file `%s`', $this->filename); } } diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/View/TemplateFileEquals.php b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/View/TemplateFileEquals.php index 6cc48397b..3311c3a27 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/View/TemplateFileEquals.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/View/TemplateFileEquals.php @@ -22,7 +22,6 @@ */ class TemplateFileEquals extends Constraint { - /** * @var string */ @@ -58,6 +57,6 @@ public function matches($other) */ public function toString() { - return sprintf('equals template file %s', $this->filename); + return sprintf('equals template file `%s`', $this->filename); } } diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/EmailAssertTrait.php b/app/vendor/cakephp/cakephp/src/TestSuite/EmailAssertTrait.php index d272e4a2a..c1e1108f8 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/EmailAssertTrait.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/EmailAssertTrait.php @@ -23,12 +23,10 @@ * @method void assertSame($expected, $result, $message) * @method void assertTextContains($needle, $haystack, $message) * @method \PHPUnit_Framework_MockObject_MockBuilder getMockBuilder($className) - * * @deprecated 3.7.0 Use Cake\TestSuite\EmailTrait instead */ trait EmailAssertTrait { - /** * @var \Cake\Mailer\Email */ diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/EmailTrait.php b/app/vendor/cakephp/cakephp/src/TestSuite/EmailTrait.php index 0a264c731..fabc49542 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/EmailTrait.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/EmailTrait.php @@ -15,6 +15,7 @@ namespace Cake\TestSuite; use Cake\TestSuite\Constraint\Email\MailContains; +use Cake\TestSuite\Constraint\Email\MailContainsAttachment; use Cake\TestSuite\Constraint\Email\MailContainsHtml; use Cake\TestSuite\Constraint\Email\MailContainsText; use Cake\TestSuite\Constraint\Email\MailCount; @@ -61,19 +62,18 @@ public function cleanupEmailTrait() * @param string $message Message * @return void */ - public function assertMailCount($count, $message = null) + public function assertMailCount($count, $message = '') { $this->assertThat($count, new MailCount(), $message); } /** - * * Asserts that no emails were sent * * @param string $message Message * @return void */ - public function assertNoMailSent($message = null) + public function assertNoMailSent($message = '') { $this->assertThat(null, new NoMailSent(), $message); } @@ -86,7 +86,7 @@ public function assertNoMailSent($message = null) * @param string $message Message * @return void */ - public function assertMailSentToAt($at, $address, $message = null) + public function assertMailSentToAt($at, $address, $message = '') { $this->assertThat($address, new MailSentTo($at), $message); } @@ -95,11 +95,11 @@ public function assertMailSentToAt($at, $address, $message = null) * Asserts an email at a specific index was sent from an address * * @param int $at Email index - * @param string $address Email address + * @param string|array $address Email address or [$emailAddress => $displayName]. * @param string $message Message * @return void */ - public function assertMailSentFromAt($at, $address, $message = null) + public function assertMailSentFromAt($at, $address, $message = '') { $this->assertThat($address, new MailSentFrom($at), $message); } @@ -112,7 +112,7 @@ public function assertMailSentFromAt($at, $address, $message = null) * @param string $message Message * @return void */ - public function assertMailContainsAt($at, $contents, $message = null) + public function assertMailContainsAt($at, $contents, $message = '') { $this->assertThat($contents, new MailContains($at), $message); } @@ -125,7 +125,7 @@ public function assertMailContainsAt($at, $contents, $message = null) * @param string $message Message * @return void */ - public function assertMailContainsHtmlAt($at, $contents, $message = null) + public function assertMailContainsHtmlAt($at, $contents, $message = '') { $this->assertThat($contents, new MailContainsHtml($at), $message); } @@ -138,7 +138,7 @@ public function assertMailContainsHtmlAt($at, $contents, $message = null) * @param string $message Message * @return void */ - public function assertMailContainsTextAt($at, $contents, $message = null) + public function assertMailContainsTextAt($at, $contents, $message = '') { $this->assertThat($contents, new MailContainsText($at), $message); } @@ -152,7 +152,7 @@ public function assertMailContainsTextAt($at, $contents, $message = null) * @param string $message Message * @return void */ - public function assertMailSentWithAt($at, $expected, $parameter, $message = null) + public function assertMailSentWithAt($at, $expected, $parameter, $message = '') { $this->assertThat($expected, new MailSentWith($at, $parameter), $message); } @@ -164,7 +164,7 @@ public function assertMailSentWithAt($at, $expected, $parameter, $message = null * @param string $message Message * @return void */ - public function assertMailSentTo($address, $message = null) + public function assertMailSentTo($address, $message = '') { $this->assertThat($address, new MailSentTo(), $message); } @@ -172,11 +172,11 @@ public function assertMailSentTo($address, $message = null) /** * Asserts an email was sent from an address * - * @param string $address Email address + * @param string|array $address Email address or [$emailAddress => $displayName]. * @param string $message Message * @return void */ - public function assertMailSentFrom($address, $message = null) + public function assertMailSentFrom($address, $message = '') { $this->assertThat($address, new MailSentFrom(), $message); } @@ -188,11 +188,24 @@ public function assertMailSentFrom($address, $message = null) * @param string $message Message * @return void */ - public function assertMailContains($contents, $message = null) + public function assertMailContains($contents, $message = '') { $this->assertThat($contents, new MailContains(), $message); } + /** + * Asserts an email contains expected attachment + * + * @param string $filename Filename + * @param array $file Additional file properties + * @param string $message Message + * @return void + */ + public function assertMailContainsAttachment($filename, array $file = [], $message = '') + { + $this->assertThat([$filename, $file], new MailContainsAttachment(), $message); + } + /** * Asserts an email contains expected html contents * @@ -200,7 +213,7 @@ public function assertMailContains($contents, $message = null) * @param string $message Message * @return void */ - public function assertMailContainsHtml($contents, $message = null) + public function assertMailContainsHtml($contents, $message = '') { $this->assertThat($contents, new MailContainsHtml(), $message); } @@ -212,7 +225,7 @@ public function assertMailContainsHtml($contents, $message = null) * @param string $message Message to display if assertion fails. * @return void */ - public function assertMailContainsText($expectedText, $message = null) + public function assertMailContainsText($expectedText, $message = '') { $this->assertThat($expectedText, new MailContainsText(), $message); } @@ -225,7 +238,7 @@ public function assertMailContainsText($expectedText, $message = null) * @param string $message Message * @return void */ - public function assertMailSentWith($expected, $parameter, $message = null) + public function assertMailSentWith($expected, $parameter, $message = '') { $this->assertThat($expected, new MailSentWith(null, $parameter), $message); } diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Fixture/FixtureInjector.php b/app/vendor/cakephp/cakephp/src/TestSuite/Fixture/FixtureInjector.php index 3f5044fda..2dc067d63 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Fixture/FixtureInjector.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Fixture/FixtureInjector.php @@ -27,7 +27,6 @@ */ class FixtureInjector extends BaseTestListener { - /** * The instance of the fixture manager to use * diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Fixture/FixtureManager.php b/app/vendor/cakephp/cakephp/src/TestSuite/Fixture/FixtureManager.php index 6817fcf7e..88af335b3 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Fixture/FixtureManager.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Fixture/FixtureManager.php @@ -30,7 +30,6 @@ */ class FixtureManager { - /** * Was this instance already initialized? * @@ -94,12 +93,9 @@ public function setDebug($debug) public function fixturize($test) { $this->_initDb(); - if (empty($test->fixtures) || !empty($this->_processed[get_class($test)])) { + if (!$test->getFixtures() || !empty($this->_processed[get_class($test)])) { return; } - if (!is_array($test->fixtures)) { - $test->fixtures = array_map('trim', explode(',', $test->fixtures)); - } $this->_loadFixtures($test); $this->_processed[get_class($test)] = true; } @@ -168,10 +164,11 @@ protected function _initDb() */ protected function _loadFixtures($test) { - if (empty($test->fixtures)) { + $fixtures = $test->getFixtures(); + if (!$fixtures) { return; } - foreach ($test->fixtures as $fixture) { + foreach ($fixtures as $fixture) { if (isset($this->_loaded[$fixture])) { continue; } @@ -231,7 +228,7 @@ protected function _loadFixtures($test) $baseNamespace, 'Test\Fixture', $additionalPath, - $name . 'Fixture' + $name . 'Fixture', ]; $className = implode('\\', array_filter($nameSegments)); } else { @@ -298,11 +295,7 @@ protected function _setupTable($fixture, $db, array $sources, $drop = true) */ public function load($test) { - if (empty($test->fixtures)) { - return; - } - - $fixtures = $test->fixtures; + $fixtures = $test->getFixtures(); if (empty($fixtures) || !$test->autoFixtures) { return; } @@ -450,7 +443,8 @@ protected function _fixtureConnections($fixtures) */ public function unload($test) { - if (empty($test->fixtures)) { + $fixtures = $test->getFixtures(); + if (!$fixtures) { return; } $truncate = function ($db, $fixtures) { @@ -468,7 +462,7 @@ public function unload($test) } } }; - $this->_runOperation($test->fixtures, $truncate); + $this->_runOperation($fixtures, $truncate); } /** diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Fixture/TestFixture.php b/app/vendor/cakephp/cakephp/src/TestSuite/Fixture/TestFixture.php index 5a0ec612d..9ee2a3dd1 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Fixture/TestFixture.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Fixture/TestFixture.php @@ -32,7 +32,6 @@ */ class TestFixture implements FixtureInterface, TableSchemaInterface, TableSchemaAwareInterface { - use LocatorAwareTrait; /** @@ -180,7 +179,7 @@ protected function _tableFromClass() protected function _schemaFromFields() { $connection = ConnectionManager::get($this->connection()); - $this->_schema = new TableSchema($this->table); + $this->_schema = $connection->getDriver()->newTableSchema($this->table); foreach ($this->fields as $field => $data) { if ($field === '_constraints' || $field === '_indexes' || $field === '_options') { continue; @@ -250,7 +249,7 @@ protected function _schemaFromReflection() $schemaCollection = $db->getSchemaCollection(); $tables = $schemaCollection->listTables(); - if (!in_array($this->table, $tables)) { + if (!in_array($this->table, $tables, true)) { throw new CakeException( sprintf( 'Cannot describe schema for table `%s` for fixture `%s` : the table does not exist.', diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/IntegrationTestTrait.php b/app/vendor/cakephp/cakephp/src/TestSuite/IntegrationTestTrait.php index a339d7d14..0936daad7 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/IntegrationTestTrait.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/IntegrationTestTrait.php @@ -54,9 +54,9 @@ use Cake\Utility\Text; use Cake\View\Helper\SecureFieldTokenTrait; use Exception; +use Laminas\Diactoros\Uri; use LogicException; use PHPUnit\Exception as PhpunitException; -use Zend\Diactoros\Uri; /** * A trait intended to make integration tests of your controllers easier. @@ -184,13 +184,12 @@ trait IntegrationTestTrait /** * Stored flash messages before render * - * @var null|array + * @var array|null */ protected $_flashMessages; /** - * - * @var null|string + * @var string|null */ protected $_cookieEncryptionKey; @@ -858,7 +857,7 @@ public function assertResponseCode($code, $message = null) } /** - * Asserts that the Location header is correct. + * Asserts that the Location header is correct. Comparison is made against a full URL. * * @param string|array|null $url The URL you expected the client to go to. This * can either be a string URL or an array compatible with Router::url(). Use null to @@ -876,6 +875,25 @@ public function assertRedirect($url = null, $message = '') } } + /** + * Asserts that the Location header is correct. Comparison is made against exactly the URL provided. + * + * @param string|array|null $url The URL you expected the client to go to. This + * can either be a string URL or an array compatible with Router::url(). Use null to + * simply check for the existence of this header. + * @param string $message The failure message that will be appended to the generated message. + * @return void + */ + public function assertRedirectEquals($url = null, $message = '') + { + $verboseMessage = $this->extractVerboseMessage($message); + $this->assertThat(null, new HeaderSet($this->_response, 'Location'), $verboseMessage); + + if ($url) { + $this->assertThat(Router::url($url), new HeaderEquals($this->_response, 'Location'), $verboseMessage); + } + } + /** * Asserts that the Location header contains a substring * @@ -1259,7 +1277,7 @@ public function assertFileResponse($expected, $message = '') * Inspect controller to extract possible causes of the failed assertion * * @param string $message Original message to use as a base - * @return null|string + * @return string|null */ protected function extractVerboseMessage($message = null) { diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/LegacyRequestDispatcher.php b/app/vendor/cakephp/cakephp/src/TestSuite/LegacyRequestDispatcher.php index 86626e145..1d80310d2 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/LegacyRequestDispatcher.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/LegacyRequestDispatcher.php @@ -26,7 +26,6 @@ */ class LegacyRequestDispatcher { - /** * @var \Cake\TestSuite\IntegrationTestCase */ diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/MiddlewareDispatcher.php b/app/vendor/cakephp/cakephp/src/TestSuite/MiddlewareDispatcher.php index b2b0ae927..e25e9c4eb 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/MiddlewareDispatcher.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/MiddlewareDispatcher.php @@ -20,10 +20,10 @@ use Cake\Http\Server; use Cake\Http\ServerRequestFactory; use Cake\Routing\Router; +use Laminas\Diactoros\Stream; use LogicException; use ReflectionClass; use ReflectionException; -use Zend\Diactoros\Stream; /** * Dispatches a request capturing the response for integration @@ -57,7 +57,7 @@ class MiddlewareDispatcher /** * The application that is being dispatched. * - * @var \Cake\Core\HttpApplicationInterface + * @var \Cake\Core\HttpApplicationInterface|\Cake\Core\ConsoleApplicationInterface */ protected $app; @@ -85,7 +85,7 @@ public function __construct($test, $class = null, $constructorArgs = null, $disa $app = $reflect->newInstanceArgs($this->_constructorArgs); $this->app = $app; } catch (ReflectionException $e) { - throw new LogicException(sprintf('Cannot load "%s" for use in integration testing.', $this->_class)); + throw new LogicException(sprintf('Cannot load `%s` for use in integration testing.', $this->_class)); } } diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/MockBuilder.php b/app/vendor/cakephp/cakephp/src/TestSuite/MockBuilder.php new file mode 100644 index 000000000..bf961ef5f --- /dev/null +++ b/app/vendor/cakephp/cakephp/src/TestSuite/MockBuilder.php @@ -0,0 +1,57 @@ +replies); $message = "There are no more input replies available. This is the {$nth} read operation, " . - "only {$total} replies were set. The provided replies are: {$replies}"; - throw new ConsoleException($message); + "only {$total} replies were set.\nThe provided replies are: {$replies}"; + throw new MissingConsoleInputException($message); } return $this->replies[$this->currentIndex]; diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Stub/ConsoleOutput.php b/app/vendor/cakephp/cakephp/src/TestSuite/Stub/ConsoleOutput.php index f9c2b76b0..33d1536ea 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Stub/ConsoleOutput.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Stub/ConsoleOutput.php @@ -31,7 +31,6 @@ */ class ConsoleOutput extends ConsoleOutputBase { - /** * Buffered messages. * @@ -42,7 +41,7 @@ class ConsoleOutput extends ConsoleOutputBase /** * Write output to the buffer. * - * @param string|array $message A string or an array of strings to output + * @param string|string[] $message A string or an array of strings to output * @param int $newlines Number of newlines to append * @return void */ diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Stub/MissingConsoleInputException.php b/app/vendor/cakephp/cakephp/src/TestSuite/Stub/MissingConsoleInputException.php new file mode 100644 index 000000000..8c097884a --- /dev/null +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Stub/MissingConsoleInputException.php @@ -0,0 +1,33 @@ +message .= "\nThe question asked was: " . $question; + } +} diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Stub/Response.php b/app/vendor/cakephp/cakephp/src/TestSuite/Stub/Response.php index 1d8b51252..697cce0af 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Stub/Response.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Stub/Response.php @@ -20,7 +20,6 @@ */ class Response extends Base { - /** * Stub the send() method so headers and output are not sent. * @@ -31,7 +30,7 @@ public function send() if ($this->hasHeader('Location') && $this->_status === 200) { $this->statusCode(302); } - $this->_setContentType(); + $this->_setContentType($this->getType()); return $this; } diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Stub/TestExceptionRenderer.php b/app/vendor/cakephp/cakephp/src/TestSuite/Stub/TestExceptionRenderer.php index 5d194cf1d..0c6158941 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/Stub/TestExceptionRenderer.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/Stub/TestExceptionRenderer.php @@ -28,7 +28,6 @@ */ class TestExceptionRenderer { - /** * Simply rethrow the given exception * diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/TestCase.php b/app/vendor/cakephp/cakephp/src/TestSuite/TestCase.php index d8c987d9a..8d4dd068d 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/TestCase.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/TestCase.php @@ -34,7 +34,6 @@ */ abstract class TestCase extends BaseTestCase { - use LocatorAwareTrait; /** @@ -44,6 +43,13 @@ abstract class TestCase extends BaseTestCase */ public $fixtureManager; + /** + * Fixtures used by this test case. + * + * @var string[]|string|null + */ + public $fixtures; + /** * By default, all fixtures attached to this class will be truncated and reloaded after each test. * Set this to false to handle manually @@ -69,13 +75,6 @@ abstract class TestCase extends BaseTestCase */ protected $_configure = []; - /** - * Path settings to restore at the end of the test. - * - * @var array - */ - protected $_pathRestore = []; - /** * Overrides SimpleTestCase::skipIf to provide a boolean return value * @@ -161,6 +160,9 @@ public function tearDown() Configure::write($this->_configure); } $this->getTableLocator()->clear(); + $this->_configure = []; + $this->_tableLocator = null; + $this->fixtureManager = null; } /** @@ -730,6 +732,107 @@ protected function skipUnless($condition, $message = '') // @codingStandardsIgnoreEnd + /** + * @inheritDoc + */ + public function getMockBuilder($className) + { + return new MockBuilder($this, $className); + } + + /** + * @inheritDoc + */ + protected function getMockClass( + $originalClassName, + $methods = [], + array $arguments = [], + $mockClassName = '', + $callOriginalConstructor = false, + $callOriginalClone = true, + $callAutoload = true, + $cloneArguments = false + ) { + MockBuilder::setSupressedErrorHandler(); + + try { + return parent::getMockClass( + $originalClassName, + $methods, + $arguments, + $mockClassName, + $callOriginalConstructor, + $callOriginalClone, + $callAutoload, + $cloneArguments + ); + } finally { + restore_error_handler(); + } + } + + /** + * @inheritDoc + */ + protected function getMockForTrait( + $traitName, + array $arguments = [], + $mockClassName = '', + $callOriginalConstructor = true, + $callOriginalClone = true, + $callAutoload = true, + $mockedMethods = [], + $cloneArguments = false + ) { + MockBuilder::setSupressedErrorHandler(); + + try { + return parent::getMockForTrait( + $traitName, + $arguments, + $mockClassName, + $callOriginalConstructor, + $callOriginalClone, + $callAutoload, + $mockedMethods, + $cloneArguments + ); + } finally { + restore_error_handler(); + } + } + + /** + * @inheritDoc + */ + protected function getMockForAbstractClass( + $originalClassName, + array $arguments = [], + $mockClassName = '', + $callOriginalConstructor = true, + $callOriginalClone = true, + $callAutoload = true, + $mockedMethods = [], + $cloneArguments = false + ) { + MockBuilder::setSupressedErrorHandler(); + + try { + return parent::getMockForAbstractClass( + $originalClassName, + $arguments, + $mockClassName, + $callOriginalConstructor, + $callOriginalClone, + $callAutoload, + $mockedMethods, + $cloneArguments + ); + } finally { + restore_error_handler(); + } + } + /** * Mock a model, maintain fixtures and table association * @@ -809,4 +912,57 @@ public static function setAppNamespace($appNamespace = 'TestApp') { Configure::write('App.namespace', $appNamespace); } + + /** + * Adds a fixture to this test case. + * + * Examples: + * - core.Tags + * - app.MyRecords + * - plugin.MyPluginName.MyModelName + * + * Use this method inside your test cases' {@link getFixtures()} method + * to build up the fixture list. + * + * @param string $fixture Fixture + * @return $this + */ + protected function addFixture($fixture) + { + if (!isset($this->fixtures)) { + $this->fixtures = []; + } elseif (is_string($this->fixtures)) { + deprecationWarning( + 'Setting fixtures as string is deprecated and will be removed in 4.0.' . + ' Set TestCase::$fixtures as array instead.' + ); + $this->fixtures = array_map('trim', explode(',', $this->fixtures)); + } + + $this->fixtures[] = $fixture; + + return $this; + } + + /** + * Gets fixtures. + * + * @return array + */ + public function getFixtures() + { + if (!isset($this->fixtures)) { + return []; + } + if (is_string($this->fixtures)) { + deprecationWarning( + 'Setting fixtures as string is deprecated and will be removed in 4.0.' . + ' Set TestCase::$fixtures as array instead.' + ); + + return array_map('trim', explode(',', $this->fixtures)); + } + + return $this->fixtures; + } } diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/TestEmailTransport.php b/app/vendor/cakephp/cakephp/src/TestSuite/TestEmailTransport.php index da2c6d842..5361f7e6a 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/TestEmailTransport.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/TestEmailTransport.php @@ -23,7 +23,7 @@ * * Set this as the email transport to capture emails for later assertions * - * @see Cake\TestSuite\EmailTrait + * @see \Cake\TestSuite\EmailTrait */ class TestEmailTransport extends DebugTransport { diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/TestSuite.php b/app/vendor/cakephp/cakephp/src/TestSuite/TestSuite.php index 1c27a5bb2..88f899429 100644 --- a/app/vendor/cakephp/cakephp/src/TestSuite/TestSuite.php +++ b/app/vendor/cakephp/cakephp/src/TestSuite/TestSuite.php @@ -26,7 +26,6 @@ */ class TestSuite extends BaseTestSuite { - /** * Adds all the files in a directory to the test suite. Does not recursive through directories. * diff --git a/app/vendor/cakephp/cakephp/src/Utility/CookieCryptTrait.php b/app/vendor/cakephp/cakephp/src/Utility/CookieCryptTrait.php index 6f225934e..4a7b1300f 100644 --- a/app/vendor/cakephp/cakephp/src/Utility/CookieCryptTrait.php +++ b/app/vendor/cakephp/cakephp/src/Utility/CookieCryptTrait.php @@ -21,15 +21,14 @@ * * Provides the encrypt/decrypt logic for the CookieComponent. * - * @link https://book.cakephp.org/3.0/en/controllers/components/cookie.html + * @link https://book.cakephp.org/3/en/controllers/components/cookie.html */ trait CookieCryptTrait { - /** * Valid cipher names for encrypted cookies. * - * @var array + * @var string[] */ protected $_validCiphers = ['aes', 'rijndael']; @@ -43,8 +42,8 @@ abstract protected function _getCookieEncryptionKey(); /** * Encrypts $value using public $type method in Security class * - * @param string $value Value to encrypt - * @param string|bool $encrypt Encryption mode to use. False + * @param string|array $value Value to encrypt + * @param string|false $encrypt Encryption mode to use. False * disabled encryption. * @param string|null $key Used as the security salt if specified. * @return string Encoded values @@ -94,8 +93,8 @@ protected function _checkCipher($encrypt) /** * Decrypts $value using public $type method in Security class * - * @param array $values Values to decrypt - * @param string|bool $mode Encryption mode + * @param string[]|string $values Values to decrypt + * @param string|false $mode Encryption mode * @param string|null $key Used as the security salt if specified. * @return string|array Decrypted values */ diff --git a/app/vendor/cakephp/cakephp/src/Utility/Crypto/Mcrypt.php b/app/vendor/cakephp/cakephp/src/Utility/Crypto/Mcrypt.php index 7d0b7a3b7..038d01dea 100644 --- a/app/vendor/cakephp/cakephp/src/Utility/Crypto/Mcrypt.php +++ b/app/vendor/cakephp/cakephp/src/Utility/Crypto/Mcrypt.php @@ -20,12 +20,11 @@ * This class is not intended to be used directly and should only * be used in the context of Cake\Utility\Security. * - * @deprecated 3.3.0 It is recommended to use {@see Cake\Utility\Crypto\OpenSsl} instead. + * @deprecated 3.3.0 It is recommended to use {@see \Cake\Utility\Crypto\OpenSsl} instead. * @internal */ class Mcrypt { - /** * Encrypts/Decrypts a text using the given key using rijndael method. * diff --git a/app/vendor/cakephp/cakephp/src/Utility/Crypto/OpenSsl.php b/app/vendor/cakephp/cakephp/src/Utility/Crypto/OpenSsl.php index 0d0e4d71e..2197f486a 100644 --- a/app/vendor/cakephp/cakephp/src/Utility/Crypto/OpenSsl.php +++ b/app/vendor/cakephp/cakephp/src/Utility/Crypto/OpenSsl.php @@ -29,6 +29,10 @@ */ class OpenSsl { + /** + * @var string + */ + const METHOD_AES_256_CBC = 'aes-256-cbc'; /** * Not implemented @@ -58,7 +62,7 @@ public static function rijndael($text, $key, $operation) */ public static function encrypt($plain, $key) { - $method = 'AES-256-CBC'; + $method = static::METHOD_AES_256_CBC; $ivSize = openssl_cipher_iv_length($method); $iv = openssl_random_pseudo_bytes($ivSize); @@ -76,7 +80,7 @@ public static function encrypt($plain, $key) */ public static function decrypt($cipher, $key) { - $method = 'AES-256-CBC'; + $method = static::METHOD_AES_256_CBC; $ivSize = openssl_cipher_iv_length($method); $iv = mb_substr($cipher, 0, $ivSize, '8bit'); diff --git a/app/vendor/cakephp/cakephp/src/Utility/Exception/XmlException.php b/app/vendor/cakephp/cakephp/src/Utility/Exception/XmlException.php index 4a09ab2b4..63e8978db 100644 --- a/app/vendor/cakephp/cakephp/src/Utility/Exception/XmlException.php +++ b/app/vendor/cakephp/cakephp/src/Utility/Exception/XmlException.php @@ -20,7 +20,6 @@ */ class XmlException extends Exception { - /** * {@inheritDoc} */ diff --git a/app/vendor/cakephp/cakephp/src/Utility/Hash.php b/app/vendor/cakephp/cakephp/src/Utility/Hash.php index 24f5a56e8..351b93fc3 100644 --- a/app/vendor/cakephp/cakephp/src/Utility/Hash.php +++ b/app/vendor/cakephp/cakephp/src/Utility/Hash.php @@ -26,11 +26,10 @@ * support for pseudo Xpath, its more fully featured dot notation provides * similar features in a more consistent implementation. * - * @link https://book.cakephp.org/3.0/en/core-libraries/hash.html + * @link https://book.cakephp.org/3/en/core-libraries/hash.html */ class Hash { - /** * Get a single value specified by $path out of $data. * Does not support the full dot notation feature set, @@ -38,12 +37,12 @@ class Hash * * @param array|\ArrayAccess $data Array of data or object implementing * \ArrayAccess interface to operate on. - * @param string|array $path The path being searched for. Either a dot + * @param string|int|string[]|null $path The path being searched for. Either a dot * separated string, or an array of path segments. * @param mixed $default The return value when the path does not exist * @throws \InvalidArgumentException * @return mixed The value fetched from the array, or null. - * @link https://book.cakephp.org/3.0/en/core-libraries/hash.html#Cake\Utility\Hash::get + * @link https://book.cakephp.org/3/en/core-libraries/hash.html#Cake\Utility\Hash::get */ public static function get($data, $path, $default = null) { @@ -58,7 +57,7 @@ public static function get($data, $path, $default = null) } if (is_string($path) || is_numeric($path)) { - $parts = explode('.', $path); + $parts = explode('.', (string)$path); } else { if (!is_array($path)) { throw new InvalidArgumentException(sprintf( @@ -106,7 +105,7 @@ public static function get($data, $path, $default = null) * - `>`, `<`, `>=`, `<=` Value comparison. * - `=/.../` Regular expression pattern match. * - * Given a set of User array data, from a `$User->find('all')` call: + * Given a set of User array data, from a `$usersTable->find('all')` call: * * - `1.User.name` Get the name of the user at index 1. * - `{n}.User.name` Get the name of every user in the set of users. @@ -119,7 +118,7 @@ public static function get($data, $path, $default = null) * @param string $path The path to extract. * @return array|\ArrayAccess An array of the extracted values. Returns an empty array * if there are no matches. - * @link https://book.cakephp.org/3.0/en/core-libraries/hash.html#Cake\Utility\Hash::extract + * @link https://book.cakephp.org/3/en/core-libraries/hash.html#Cake\Utility\Hash::extract */ public static function extract($data, $path) { @@ -174,7 +173,8 @@ public static function extract($data, $path) if ($conditions) { $filter = []; foreach ($next as $item) { - if ((is_array($item) || $item instanceof ArrayAccess) && + if ( + (is_array($item) || $item instanceof ArrayAccess) && static::_matches($item, $conditions) ) { $filter[] = $item; @@ -281,7 +281,8 @@ protected static function _matches($data, $selector) if (!preg_match($val, $prop)) { return false; } - } elseif (($op === '=' && $prop != $val) || + } elseif ( + ($op === '=' && $prop != $val) || ($op === '!=' && $prop == $val) || ($op === '>' && $prop <= $val) || ($op === '<' && $prop >= $val) || @@ -301,9 +302,9 @@ protected static function _matches($data, $selector) * * @param array $data The data to insert into. * @param string $path The path to insert at. - * @param array|null $values The values to insert. + * @param mixed $values The values to insert. * @return array The data with $values inserted. - * @link https://book.cakephp.org/3.0/en/core-libraries/hash.html#Cake\Utility\Hash::insert + * @link https://book.cakephp.org/3/en/core-libraries/hash.html#Cake\Utility\Hash::insert */ public static function insert(array $data, $path, $values = null) { @@ -347,7 +348,7 @@ public static function insert(array $data, $path, $values = null) * * @param string $op The operation to do. * @param array $data The data to operate on. - * @param array $path The path to work on. + * @param string[] $path The path to work on. * @param mixed $values The values to insert when doing inserts. * @return array data. */ @@ -385,6 +386,8 @@ protected static function _simpleOp($op, $data, $path, $values = null) $_list =& $_list[$key]; } } + + return $data; } /** @@ -395,7 +398,7 @@ protected static function _simpleOp($op, $data, $path, $values = null) * @param array $data The data to operate on * @param string $path A path expression to use to remove. * @return array The modified array. - * @link https://book.cakephp.org/3.0/en/core-libraries/hash.html#Cake\Utility\Hash::remove + * @link https://book.cakephp.org/3/en/core-libraries/hash.html#Cake\Utility\Hash::remove */ public static function remove(array $data, $path) { @@ -451,12 +454,12 @@ public static function remove(array $data, $path) * following the path specified in `$groupPath`. * * @param array $data Array from where to extract keys and values - * @param string $keyPath A dot-separated string. - * @param string|null $valuePath A dot-separated string. + * @param array|string|null $keyPath A dot-separated string. If null it will create a numbered array. + * @param array|string|null $valuePath A dot-separated string. * @param string|null $groupPath A dot-separated string. * @return array Combined array - * @link https://book.cakephp.org/3.0/en/core-libraries/hash.html#Cake\Utility\Hash::combine - * @throws \RuntimeException When keys and values count is unequal. + * @link https://book.cakephp.org/3/en/core-libraries/hash.html#Cake\Utility\Hash::combine + * @throws \RuntimeException When keys is an array, and keys and values count is unequal. */ public static function combine(array $data, $keyPath, $valuePath = null, $groupPath = null) { @@ -467,10 +470,12 @@ public static function combine(array $data, $keyPath, $valuePath = null, $groupP if (is_array($keyPath)) { $format = array_shift($keyPath); $keys = static::format($data, $keyPath, $format); + } elseif ($keyPath === null) { + $keys = $keyPath; } else { $keys = static::extract($data, $keyPath); } - if (empty($keys)) { + if ($keyPath !== null && empty($keys)) { return []; } @@ -482,10 +487,10 @@ public static function combine(array $data, $keyPath, $valuePath = null, $groupP $vals = static::extract($data, $valuePath); } if (empty($vals)) { - $vals = array_fill(0, count($keys), null); + $vals = array_fill(0, $keys === null ? count($data) : count($keys), null); } - if (count($keys) !== count($vals)) { + if (is_array($keys) && count($keys) !== count($vals)) { throw new RuntimeException( 'Hash::combine() needs an equal number of keys + values.' ); @@ -494,7 +499,7 @@ public static function combine(array $data, $keyPath, $valuePath = null, $groupP if ($groupPath !== null) { $group = static::extract($data, $groupPath); if (!empty($group)) { - $c = count($keys); + $c = is_array($keys) ? count($keys) : count($vals); $out = []; for ($i = 0; $i < $c; $i++) { if (!isset($group[$i])) { @@ -503,7 +508,11 @@ public static function combine(array $data, $keyPath, $valuePath = null, $groupP if (!isset($out[$group[$i]])) { $out[$group[$i]] = []; } - $out[$group[$i]][$keys[$i]] = $vals[$i]; + if ($keys === null) { + $out[$group[$i]][] = $vals[$i]; + } else { + $out[$group[$i]][$keys[$i]] = $vals[$i]; + } } return $out; @@ -513,7 +522,7 @@ public static function combine(array $data, $keyPath, $valuePath = null, $groupP return []; } - return array_combine($keys, $vals); + return array_combine($keys === null ? range(0, count($vals) - 1) : $keys, $vals); } /** @@ -529,10 +538,10 @@ public static function combine(array $data, $keyPath, $valuePath = null, $groupP * The `$format` string can use any format options that `vsprintf()` and `sprintf()` do. * * @param array $data Source array from which to extract the data - * @param array $paths An array containing one or more Hash::extract()-style key paths + * @param string[] $paths An array containing one or more Hash::extract()-style key paths * @param string $format Format string into which values will be inserted, see sprintf() - * @return array|null An array of strings extracted from `$path` and formatted with `$format` - * @link https://book.cakephp.org/3.0/en/core-libraries/hash.html#Cake\Utility\Hash::format + * @return string[]|null An array of strings extracted from `$path` and formatted with `$format` + * @link https://book.cakephp.org/3/en/core-libraries/hash.html#Cake\Utility\Hash::format * @see sprintf() * @see \Cake\Utility\Hash::extract() */ @@ -572,7 +581,7 @@ public static function format(array $data, array $paths, $format) * @param array $data The data to search through. * @param array $needle The values to file in $data * @return bool true If $data contains $needle, false otherwise - * @link https://book.cakephp.org/3.0/en/core-libraries/hash.html#Cake\Utility\Hash::contains + * @link https://book.cakephp.org/3/en/core-libraries/hash.html#Cake\Utility\Hash::contains */ public static function contains(array $data, array $needle) { @@ -616,7 +625,7 @@ public static function contains(array $data, array $needle) * @param string $path The path to check for. * @return bool Existence of path. * @see \Cake\Utility\Hash::extract() - * @link https://book.cakephp.org/3.0/en/core-libraries/hash.html#Cake\Utility\Hash::check + * @link https://book.cakephp.org/3/en/core-libraries/hash.html#Cake\Utility\Hash::check */ public static function check(array $data, $path) { @@ -635,7 +644,7 @@ public static function check(array $data, $path) * @param callable|array $callback A function to filter the data with. Defaults to * `static::_filter()` Which strips out all non-zero empty values. * @return array Filtered array - * @link https://book.cakephp.org/3.0/en/core-libraries/hash.html#Cake\Utility\Hash::filter + * @link https://book.cakephp.org/3/en/core-libraries/hash.html#Cake\Utility\Hash::filter */ public static function filter(array $data, $callback = ['self', '_filter']) { @@ -667,7 +676,7 @@ protected static function _filter($var) * @param array $data Array to flatten * @param string $separator String used to separate array key elements in a path, defaults to '.' * @return array - * @link https://book.cakephp.org/3.0/en/core-libraries/hash.html#Cake\Utility\Hash::flatten + * @link https://book.cakephp.org/3/en/core-libraries/hash.html#Cake\Utility\Hash::flatten */ public static function flatten(array $data, $separator = '.') { @@ -711,21 +720,21 @@ public static function flatten(array $data, $separator = '.') * @param array $data Flattened array * @param string $separator The delimiter used * @return array - * @link https://book.cakephp.org/3.0/en/core-libraries/hash.html#Cake\Utility\Hash::expand + * @link https://book.cakephp.org/3/en/core-libraries/hash.html#Cake\Utility\Hash::expand */ public static function expand(array $data, $separator = '.') { $result = []; foreach ($data as $flat => $value) { - $keys = explode($separator, $flat); + $keys = explode($separator, (string)$flat); $keys = array_reverse($keys); $child = [ - $keys[0] => $value + $keys[0] => $value, ]; array_shift($keys); foreach ($keys as $k) { $child = [ - $k => $child + $k => $child, ]; } @@ -748,7 +757,7 @@ public static function expand(array $data, $separator = '.') * @param array $data Array to be merged * @param mixed $merge Array to merge with. The argument and all trailing arguments will be array cast when merged * @return array Merged array - * @link https://book.cakephp.org/3.0/en/core-libraries/hash.html#Cake\Utility\Hash::merge + * @link https://book.cakephp.org/3/en/core-libraries/hash.html#Cake\Utility\Hash::merge */ public static function merge(array $data, $merge) { @@ -798,7 +807,7 @@ protected static function _merge($stack, &$return) * * @param array $data The array to check. * @return bool true if values are numeric, false otherwise - * @link https://book.cakephp.org/3.0/en/core-libraries/hash.html#Cake\Utility\Hash::numeric + * @link https://book.cakephp.org/3/en/core-libraries/hash.html#Cake\Utility\Hash::numeric */ public static function numeric(array $data) { @@ -818,7 +827,7 @@ public static function numeric(array $data) * * @param array $data Array to count dimensions on * @return int The number of dimensions in $data - * @link https://book.cakephp.org/3.0/en/core-libraries/hash.html#Cake\Utility\Hash::dimensions + * @link https://book.cakephp.org/3/en/core-libraries/hash.html#Cake\Utility\Hash::dimensions */ public static function dimensions(array $data) { @@ -845,7 +854,7 @@ public static function dimensions(array $data) * * @param array $data Array to count dimensions on * @return int The maximum number of dimensions in $data - * @link https://book.cakephp.org/3.0/en/core-libraries/hash.html#Cake\Utility\Hash::maxDimensions + * @link https://book.cakephp.org/3/en/core-libraries/hash.html#Cake\Utility\Hash::maxDimensions */ public static function maxDimensions(array $data) { @@ -871,7 +880,7 @@ public static function maxDimensions(array $data) * @param string $path The path to extract for mapping over. * @param callable $function The function to call on each extracted value. * @return array An array of the modified values. - * @link https://book.cakephp.org/3.0/en/core-libraries/hash.html#Cake\Utility\Hash::map + * @link https://book.cakephp.org/3/en/core-libraries/hash.html#Cake\Utility\Hash::map */ public static function map(array $data, $path, $function) { @@ -887,7 +896,7 @@ public static function map(array $data, $path, $function) * @param string $path The path to extract from $data. * @param callable $function The function to call on each extracted value. * @return mixed The reduced value. - * @link https://book.cakephp.org/3.0/en/core-libraries/hash.html#Cake\Utility\Hash::reduce + * @link https://book.cakephp.org/3/en/core-libraries/hash.html#Cake\Utility\Hash::reduce */ public static function reduce(array $data, $path, $function) { @@ -919,7 +928,7 @@ public static function reduce(array $data, $path, $function) * @param string $path The path to extract from $data. * @param callable $function The function to call on each extracted value. * @return mixed The results of the applied method. - * @link https://book.cakephp.org/3.0/en/core-libraries/hash.html#Cake\Utility\Hash::apply + * @link https://book.cakephp.org/3/en/core-libraries/hash.html#Cake\Utility\Hash::apply */ public static function apply(array $data, $path, $function) { @@ -959,7 +968,7 @@ public static function apply(array $data, $path, $function) * @param string $dir See directions above. Defaults to 'asc'. * @param array|string $type See direction types above. Defaults to 'regular'. * @return array Sorted array of data - * @link https://book.cakephp.org/3.0/en/core-libraries/hash.html#Cake\Utility\Hash::sort + * @link https://book.cakephp.org/3/en/core-libraries/hash.html#Cake\Utility\Hash::sort */ public static function sort(array $data, $path, $dir = 'asc', $type = 'regular') { @@ -1074,7 +1083,7 @@ protected static function _squash(array $data, $key = null) * @param array $compare Second value * @return array Returns the key => value pairs that are not common in $data and $compare * The expression for this function is ($data - $compare) + ($compare - ($data - $compare)) - * @link https://book.cakephp.org/3.0/en/core-libraries/hash.html#Cake\Utility\Hash::diff + * @link https://book.cakephp.org/3/en/core-libraries/hash.html#Cake\Utility\Hash::diff */ public static function diff(array $data, array $compare) { @@ -1101,7 +1110,7 @@ public static function diff(array $data, array $compare) * @param array $data The data to append onto. * @param array $compare The data to compare and append onto. * @return array The merged array. - * @link https://book.cakephp.org/3.0/en/core-libraries/hash.html#Cake\Utility\Hash::mergeDiff + * @link https://book.cakephp.org/3/en/core-libraries/hash.html#Cake\Utility\Hash::mergeDiff */ public static function mergeDiff(array $data, array $compare) { @@ -1114,8 +1123,8 @@ public static function mergeDiff(array $data, array $compare) foreach ($compare as $key => $value) { if (!array_key_exists($key, $data)) { $data[$key] = $value; - } elseif (is_array($value)) { - $data[$key] = static::mergeDiff($data[$key], $compare[$key]); + } elseif (is_array($value) && is_array($data[$key])) { + $data[$key] = static::mergeDiff($data[$key], $value); } } @@ -1128,7 +1137,7 @@ public static function mergeDiff(array $data, array $compare) * @param array $data List to normalize * @param bool $assoc If true, $data will be converted to an associative array. * @return array - * @link https://book.cakephp.org/3.0/en/core-libraries/hash.html#Cake\Utility\Hash::normalize + * @link https://book.cakephp.org/3/en/core-libraries/hash.html#Cake\Utility\Hash::normalize */ public static function normalize(array $data, $assoc = true) { @@ -1176,7 +1185,7 @@ public static function normalize(array $data, $assoc = true) * @return array of results, nested * @see \Cake\Utility\Hash::extract() * @throws \InvalidArgumentException When providing invalid data. - * @link https://book.cakephp.org/3.0/en/core-libraries/hash.html#Cake\Utility\Hash::nest + * @link https://book.cakephp.org/3/en/core-libraries/hash.html#Cake\Utility\Hash::nest */ public static function nest(array $data, array $options = []) { @@ -1189,7 +1198,7 @@ public static function nest(array $data, array $options = []) 'idPath' => "{n}.$alias.id", 'parentPath' => "{n}.$alias.parent_id", 'children' => 'children', - 'root' => null + 'root' => null, ]; $return = $idMap = []; diff --git a/app/vendor/cakephp/cakephp/src/Utility/Inflector.php b/app/vendor/cakephp/cakephp/src/Utility/Inflector.php index 8fcec95b1..bcd3cc5fc 100644 --- a/app/vendor/cakephp/cakephp/src/Utility/Inflector.php +++ b/app/vendor/cakephp/cakephp/src/Utility/Inflector.php @@ -20,11 +20,10 @@ * Inflector pluralizes and singularizes English nouns. * Used by CakePHP's naming conventions throughout the framework. * - * @link https://book.cakephp.org/3.0/en/core-libraries/inflector.html + * @link https://book.cakephp.org/3/en/core-libraries/inflector.html */ class Inflector { - /** * Plural inflector rules * @@ -95,7 +94,7 @@ class Inflector '/(n)ews$/i' => '\1\2ews', '/eaus$/' => 'eau', '/^(.*us)$/' => '\\1', - '/s$/i' => '' + '/s$/i' => '', ]; /** @@ -158,7 +157,7 @@ class Inflector '.*pox', '.*sheep', 'people', 'feedback', 'stadia', '.*?media', 'chassis', 'clippers', 'debris', 'diabetes', 'equipment', 'gallows', 'graffiti', 'headquarters', 'information', 'innings', 'news', 'nexus', - 'pokemon', 'proceedings', 'research', 'sea[- ]bass', 'series', 'species', 'weather' + 'pokemon', 'proceedings', 'research', 'sea[- ]bass', 'series', 'species', 'weather', ]; /** @@ -417,7 +416,7 @@ class Inflector * * @param string $type Inflection type * @param string $key Original value - * @param string|bool $value Inflected value + * @param string|false $value Inflected value * @return string|false Inflected value on cache hit or false on cache miss. */ protected static function _cache($type, $key, $value = false) @@ -499,7 +498,7 @@ public static function rules($type, $rules, $reset = false) * * @param string $word Word in singular * @return string Word in plural - * @link https://book.cakephp.org/3.0/en/core-libraries/inflector.html#creating-plural-singular-forms + * @link https://book.cakephp.org/3/en/core-libraries/inflector.html#creating-plural-singular-forms */ public static function pluralize($word) { @@ -508,10 +507,17 @@ public static function pluralize($word) } if (!isset(static::$_cache['irregular']['pluralize'])) { - static::$_cache['irregular']['pluralize'] = '(?:' . implode('|', array_keys(static::$_irregular)) . ')'; + $words = array_keys(static::$_irregular); + static::$_cache['irregular']['pluralize'] = '/(.*?(?:\\b|_))(' . implode('|', $words) . ')$/i'; + + $upperWords = array_map('ucfirst', $words); + static::$_cache['irregular']['upperPluralize'] = '/(.*?(?:\\b|[a-z]))(' . implode('|', $upperWords) . ')$/'; } - if (preg_match('/(.*?(?:\\b|_))(' . static::$_cache['irregular']['pluralize'] . ')$/i', $word, $regs)) { + if ( + preg_match(static::$_cache['irregular']['pluralize'], $word, $regs) || + preg_match(static::$_cache['irregular']['upperPluralize'], $word, $regs) + ) { static::$_cache['pluralize'][$word] = $regs[1] . substr($regs[2], 0, 1) . substr(static::$_irregular[strtolower($regs[2])], 1); @@ -519,10 +525,10 @@ public static function pluralize($word) } if (!isset(static::$_cache['uninflected'])) { - static::$_cache['uninflected'] = '(?:' . implode('|', static::$_uninflected) . ')'; + static::$_cache['uninflected'] = '/^(' . implode('|', static::$_uninflected) . ')$/i'; } - if (preg_match('/^(' . static::$_cache['uninflected'] . ')$/i', $word, $regs)) { + if (preg_match(static::$_cache['uninflected'], $word, $regs)) { static::$_cache['pluralize'][$word] = $word; return $word; @@ -542,7 +548,7 @@ public static function pluralize($word) * * @param string $word Word in plural * @return string Word in singular - * @link https://book.cakephp.org/3.0/en/core-libraries/inflector.html#creating-plural-singular-forms + * @link https://book.cakephp.org/3/en/core-libraries/inflector.html#creating-plural-singular-forms */ public static function singularize($word) { @@ -551,10 +557,19 @@ public static function singularize($word) } if (!isset(static::$_cache['irregular']['singular'])) { - static::$_cache['irregular']['singular'] = '(?:' . implode('|', static::$_irregular) . ')'; + $wordList = array_values(static::$_irregular); + static::$_cache['irregular']['singular'] = '/(.*?(?:\\b|_))(' . implode('|', $wordList) . ')$/i'; + + $upperWordList = array_map('ucfirst', $wordList); + static::$_cache['irregular']['singularUpper'] = '/(.*?(?:\\b|[a-z]))(' . + implode('|', $upperWordList) . + ')$/'; } - if (preg_match('/(.*?(?:\\b|_))(' . static::$_cache['irregular']['singular'] . ')$/i', $word, $regs)) { + if ( + preg_match(static::$_cache['irregular']['singular'], $word, $regs) || + preg_match(static::$_cache['irregular']['singularUpper'], $word, $regs) + ) { static::$_cache['singularize'][$word] = $regs[1] . substr($regs[2], 0, 1) . substr(array_search(strtolower($regs[2]), static::$_irregular, true), 1); @@ -562,10 +577,10 @@ public static function singularize($word) } if (!isset(static::$_cache['uninflected'])) { - static::$_cache['uninflected'] = '(?:' . implode('|', static::$_uninflected) . ')'; + static::$_cache['uninflected'] = '/^(' . implode('|', static::$_uninflected) . ')$/i'; } - if (preg_match('/^(' . static::$_cache['uninflected'] . ')$/i', $word, $regs)) { + if (preg_match(static::$_cache['uninflected'], $word, $regs)) { static::$_cache['pluralize'][$word] = $word; return $word; @@ -589,7 +604,7 @@ public static function singularize($word) * @param string $string String to camelize * @param string $delimiter the delimiter in the input string * @return string CamelizedStringLikeThis. - * @link https://book.cakephp.org/3.0/en/core-libraries/inflector.html#creating-camelcase-and-under-scored-forms + * @link https://book.cakephp.org/3/en/core-libraries/inflector.html#creating-camelcase-and-under-scored-forms */ public static function camelize($string, $delimiter = '_') { @@ -612,7 +627,7 @@ public static function camelize($string, $delimiter = '_') * * @param string $string CamelCasedString to be "underscorized" * @return string underscore_version of the input string - * @link https://book.cakephp.org/3.0/en/core-libraries/inflector.html#creating-camelcase-and-under-scored-forms + * @link https://book.cakephp.org/3/en/core-libraries/inflector.html#creating-camelcase-and-under-scored-forms */ public static function underscore($string) { @@ -639,7 +654,7 @@ public static function dasherize($string) * @param string $string String to be humanized * @param string $delimiter the character to replace with a space * @return string Human-readable string - * @link https://book.cakephp.org/3.0/en/core-libraries/inflector.html#creating-human-readable-forms + * @link https://book.cakephp.org/3/en/core-libraries/inflector.html#creating-human-readable-forms */ public static function humanize($string, $delimiter = '_') { @@ -685,7 +700,7 @@ public static function delimit($string, $delimiter = '_') * * @param string $className Name of class to get database table name for * @return string Name of the database table for given class - * @link https://book.cakephp.org/3.0/en/core-libraries/inflector.html#creating-table-and-class-name-forms + * @link https://book.cakephp.org/3/en/core-libraries/inflector.html#creating-table-and-class-name-forms */ public static function tableize($className) { @@ -704,7 +719,7 @@ public static function tableize($className) * * @param string $tableName Name of database table to get class name for * @return string Class name - * @link https://book.cakephp.org/3.0/en/core-libraries/inflector.html#creating-table-and-class-name-forms + * @link https://book.cakephp.org/3/en/core-libraries/inflector.html#creating-table-and-class-name-forms */ public static function classify($tableName) { @@ -723,7 +738,7 @@ public static function classify($tableName) * * @param string $string String to convert. * @return string in variable form - * @link https://book.cakephp.org/3.0/en/core-libraries/inflector.html#creating-variable-names + * @link https://book.cakephp.org/3/en/core-libraries/inflector.html#creating-variable-names */ public static function variable($string) { @@ -747,7 +762,7 @@ public static function variable($string) * @param string $string the string you want to slug * @param string $replacement will replace keys in map * @return string - * @link https://book.cakephp.org/3.0/en/core-libraries/inflector.html#creating-url-safe-strings + * @link https://book.cakephp.org/3/en/core-libraries/inflector.html#creating-url-safe-strings */ public static function slug($string, $replacement = '-') { diff --git a/app/vendor/cakephp/cakephp/src/Utility/MergeVariablesTrait.php b/app/vendor/cakephp/cakephp/src/Utility/MergeVariablesTrait.php index 8517cc7a0..d77264c31 100644 --- a/app/vendor/cakephp/cakephp/src/Utility/MergeVariablesTrait.php +++ b/app/vendor/cakephp/cakephp/src/Utility/MergeVariablesTrait.php @@ -19,7 +19,6 @@ */ trait MergeVariablesTrait { - /** * Merge the list of $properties with all parent classes of the current class. * @@ -68,7 +67,8 @@ protected function _mergeProperty($property, $parentClasses, $options) { $thisValue = $this->{$property}; $isAssoc = false; - if (isset($options['associative']) && + if ( + isset($options['associative']) && in_array($property, (array)$options['associative']) ) { $isAssoc = true; diff --git a/app/vendor/cakephp/cakephp/src/Utility/README.md b/app/vendor/cakephp/cakephp/src/Utility/README.md index 3183e002c..2798d2838 100644 --- a/app/vendor/cakephp/cakephp/src/Utility/README.md +++ b/app/vendor/cakephp/cakephp/src/Utility/README.md @@ -23,7 +23,7 @@ $bigPeople = Hash::extract($things, '{n}[age>21].name'); // $bigPeople will contain ['Susan', 'Lucy'] ``` -Check the [official Hash class documentation](https://book.cakephp.org/3.0/en/core-libraries/hash.html) +Check the [official Hash class documentation](https://book.cakephp.org/3/en/core-libraries/hash.html) ### Inflector @@ -36,7 +36,7 @@ echo Inflector::pluralize('Apple'); // echoes Apples echo Inflector::singularize('People'); // echoes Person ``` -Check the [official Inflector class documentation](https://book.cakephp.org/3.0/en/core-libraries/inflector.html) +Check the [official Inflector class documentation](https://book.cakephp.org/3/en/core-libraries/inflector.html) ### Text @@ -57,7 +57,7 @@ This is the song that never ends. ``` -Check the [official Text class documentation](https://book.cakephp.org/3.0/en/core-libraries/text.html) +Check the [official Text class documentation](https://book.cakephp.org/3/en/core-libraries/text.html) ### Security @@ -70,7 +70,7 @@ $result = Security::encrypt($value, $key); Security::decrypt($result, $key); ``` -Check the [official Security class documentation](https://book.cakephp.org/3.0/en/core-libraries/security.html) +Check the [official Security class documentation](https://book.cakephp.org/3/en/core-libraries/security.html) ### Xml @@ -88,4 +88,4 @@ $data = [ $xml = Xml::build($data); ``` -Check the [official Xml class documentation](https://book.cakephp.org/3.0/en/core-libraries/xml.html) +Check the [official Xml class documentation](https://book.cakephp.org/3/en/core-libraries/xml.html) diff --git a/app/vendor/cakephp/cakephp/src/Utility/Security.php b/app/vendor/cakephp/cakephp/src/Utility/Security.php index e80098103..f649f78e2 100644 --- a/app/vendor/cakephp/cakephp/src/Utility/Security.php +++ b/app/vendor/cakephp/cakephp/src/Utility/Security.php @@ -24,7 +24,6 @@ */ class Security { - /** * Default hash method. If `$type` param for `Security::hash()` is not specified * this value is used. Defaults to 'sha1'. @@ -36,7 +35,7 @@ class Security /** * The HMAC salt to use for encryption and decryption routines * - * @var string + * @var string|null */ protected static $_salt; @@ -57,7 +56,8 @@ class Security * @param mixed $salt If true, automatically prepends the application's salt * value to $string (Security.salt). * @return string Hash - * @link https://book.cakephp.org/3.0/en/core-libraries/security.html#hashing-data + * @throws \RuntimeException + * @link https://book.cakephp.org/3/en/core-libraries/security.html#hashing-data */ public static function hash($string, $algorithm = null, $salt = false) { @@ -67,7 +67,7 @@ public static function hash($string, $algorithm = null, $salt = false) $algorithm = strtolower($algorithm); $availableAlgorithms = hash_algos(); - if (!in_array($algorithm, $availableAlgorithms)) { + if (!in_array($algorithm, $availableAlgorithms, true)) { throw new RuntimeException(sprintf( 'The hash type `%s` was not found. Available algorithms are: %s', $algorithm, @@ -284,7 +284,7 @@ protected static function _checkKey($key, $method) * @param string $cipher The ciphertext to decrypt. * @param string $key The 256 bit/32 byte key to use as a cipher key. * @param string|null $hmacSalt The salt to use for the HMAC process. Leave null to use Security.salt. - * @return string|bool Decrypted data. Any trailing null bytes will be removed. + * @return string|false Decrypted data. Any trailing null bytes will be removed. * @throws \InvalidArgumentException On invalid data or key. */ public static function decrypt($cipher, $key, $hmacSalt = null) @@ -353,6 +353,12 @@ public static function constantEquals($original, $compare) */ public static function getSalt() { + if (static::$_salt === null) { + throw new RuntimeException( + 'Salt not set. Use Security::setSalt() to set one, ideally in `config/bootstrap.php`.' + ); + } + return static::$_salt; } diff --git a/app/vendor/cakephp/cakephp/src/Utility/Text.php b/app/vendor/cakephp/cakephp/src/Utility/Text.php index 06d34034c..5b24cdfb3 100644 --- a/app/vendor/cakephp/cakephp/src/Utility/Text.php +++ b/app/vendor/cakephp/cakephp/src/Utility/Text.php @@ -14,6 +14,7 @@ */ namespace Cake\Utility; +use Cake\Core\Exception\Exception; use InvalidArgumentException; /** @@ -21,11 +22,10 @@ */ class Text { - /** * Default transliterator. * - * @var \Transliterator Transliterator instance. + * @var \Transliterator|null Transliterator instance. */ protected static $_defaultTransliterator; @@ -43,7 +43,7 @@ class Text */ protected static $_defaultHtmlNoCount = [ 'style', - 'script' + 'script', ]; /** @@ -61,25 +61,23 @@ class Text */ public static function uuid() { - $random = function_exists('random_int') ? 'random_int' : 'mt_rand'; - return sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x', // 32 bits for "time_low" - $random(0, 65535), - $random(0, 65535), + random_int(0, 65535), + random_int(0, 65535), // 16 bits for "time_mid" - $random(0, 65535), + random_int(0, 65535), // 12 bits before the 0100 of (version) 4 for "time_hi_and_version" - $random(0, 4095) | 0x4000, + random_int(0, 4095) | 0x4000, // 16 bits, 8 bits for "clk_seq_hi_res", // 8 bits for "clk_seq_low", // two most significant bits holds zero and one for variant DCE1.1 - $random(0, 0x3fff) | 0x8000, + random_int(0, 0x3fff) | 0x8000, // 48 bits for "node" - $random(0, 65535), - $random(0, 65535), - $random(0, 65535) + random_int(0, 65535), + random_int(0, 65535), + random_int(0, 65535) ); } @@ -111,7 +109,7 @@ public static function tokenize($data, $separator = ',', $leftBound = '(', $righ $offsets = [ mb_strpos($data, $separator, $offset), mb_strpos($data, $leftBound, $offset), - mb_strpos($data, $rightBound, $offset) + mb_strpos($data, $rightBound, $offset), ]; for ($i = 0; $i < 3; $i++) { if ($offsets[$i] !== false && ($offsets[$i] < $tmpOffset || $tmpOffset == -1)) { @@ -190,7 +188,7 @@ public static function tokenize($data, $separator = ',', $leftBound = '(', $righ public static function insert($str, $data, array $options = []) { $defaults = [ - 'before' => ':', 'after' => null, 'escape' => '\\', 'format' => null, 'clean' => false + 'before' => ':', 'after' => null, 'escape' => '\\', 'format' => null, 'clean' => false, ]; $options += $defaults; $format = $options['format']; @@ -484,7 +482,7 @@ protected static function _wordWrap($text, $width = 72, $break = "\n", $cut = fa * @param string|array $phrase The phrase or phrases that will be searched. * @param array $options An array of HTML attributes and options. * @return string The highlighted text - * @link https://book.cakephp.org/3.0/en/core-libraries/text.html#highlighting-substrings + * @link https://book.cakephp.org/3/en/core-libraries/text.html#highlighting-substrings */ public static function highlight($text, $phrase, array $options = []) { @@ -572,7 +570,7 @@ public static function stripLinks($text) public static function tail($text, $length = 100, array $options = []) { $default = [ - 'ellipsis' => '...', 'exact' => true + 'ellipsis' => '...', 'exact' => true, ]; $options += $default; $exact = $ellipsis = null; @@ -612,7 +610,7 @@ public static function tail($text, $length = 100, array $options = []) * @param int $length Length of returned string, including ellipsis. * @param array $options An array of HTML attributes and options. * @return string Trimmed string. - * @link https://book.cakephp.org/3.0/en/core-libraries/text.html#truncating-text + * @link https://book.cakephp.org/3/en/core-libraries/text.html#truncating-text */ public static function truncate($text, $length = 100, array $options = []) { @@ -828,7 +826,8 @@ protected static function _substr($text, $start, $length, array $options) $len = self::_strlen($part, $options); if ($offset !== 0 || $totalLength + $len > $length) { - if (strpos($part, '&') === 0 && preg_match($pattern, $part) + if ( + strpos($part, '&') === 0 && preg_match($pattern, $part) && $part !== html_entity_decode($part, ENT_HTML5 | ENT_QUOTES, 'UTF-8') ) { // Entities cannot be passed substr. @@ -883,7 +882,7 @@ protected static function _removeLastWord($text) * @param int $radius The amount of characters that will be returned on each side of the founded phrase * @param string $ellipsis Ending that will be appended * @return string Modified string - * @link https://book.cakephp.org/3.0/en/core-libraries/text.html#extracting-an-excerpt + * @link https://book.cakephp.org/3/en/core-libraries/text.html#extracting-an-excerpt */ public static function excerpt($text, $phrase, $radius = 100, $ellipsis = '...') { @@ -926,7 +925,7 @@ public static function excerpt($text, $phrase, $radius = 100, $ellipsis = '...') * @param string|null $and The word used to join the last and second last items together with. Defaults to 'and'. * @param string $separator The separator used to join all the other items together. Defaults to ', '. * @return string The glued together string. - * @link https://book.cakephp.org/3.0/en/core-libraries/text.html#converting-an-array-to-sentence-form + * @link https://book.cakephp.org/3/en/core-libraries/text.html#converting-an-array-to-sentence-form */ public static function toList(array $list, $and = null, $separator = ', ') { @@ -937,7 +936,7 @@ public static function toList(array $list, $and = null, $separator = ', ') return implode($separator, array_slice($list, null, -1)) . ' ' . $and . ' ' . array_pop($list); } - return array_pop($list); + return (string)array_pop($list); } /** @@ -987,7 +986,7 @@ public static function utf8($string) $values[] = $value; if (count($values) === $find) { - if ($find == 3) { + if ($find === 3) { $map[] = (($values[0] % 16) * 4096) + (($values[1] % 64) * 64) + ($values[2] % 64); } else { $map[] = (($values[0] % 32) * 64) + ($values[1] % 64); @@ -1035,7 +1034,7 @@ public static function ascii(array $array) * @param mixed $default Value to be returned when invalid size was used, for example 'Unknown type' * @return mixed Number of bytes as integer on success, `$default` on failure if not false * @throws \InvalidArgumentException On invalid Unit type. - * @link https://book.cakephp.org/3.0/en/core-libraries/text.html#Cake\Utility\Text::parseFileSize + * @link https://book.cakephp.org/3/en/core-libraries/text.html#Cake\Utility\Text::parseFileSize */ public static function parseFileSize($size, $default = false) { @@ -1053,7 +1052,7 @@ public static function parseFileSize($size, $default = false) if ($i !== false) { $size = (float)substr($size, 0, $l); - return $size * pow(1024, $i + 1); + return (int)($size * pow(1024, $i + 1)); } if (substr($size, -1) === 'B' && ctype_digit(substr($size, 0, -1))) { @@ -1110,7 +1109,12 @@ public static function getTransliteratorId() */ public static function setTransliteratorId($transliteratorId) { - static::setTransliterator(transliterator_create($transliteratorId)); + $transliterator = transliterator_create($transliteratorId); + if ($transliterator === null) { + throw new Exception('Unable to create transliterator for id: ' . $transliteratorId); + } + + static::setTransliterator($transliterator); static::$_defaultTransliteratorId = $transliteratorId; } @@ -1131,7 +1135,12 @@ public static function transliterate($string, $transliterator = null) $transliterator = static::$_defaultTransliterator ?: static::$_defaultTransliteratorId; } - return transliterator_transliterate($transliterator, $string); + $return = transliterator_transliterate($transliterator, $string); + if ($return === false) { + throw new Exception(sprintf('Unable to transliterate string: %s', $string)); + } + + return $return; } /** @@ -1149,7 +1158,7 @@ public static function transliterate($string, $transliterator = null) * For e.g. this option can be set to '.' to generate clean file names. * * @param string $string the string you want to slug - * @param array $options If string it will be use as replacement character + * @param array|string $options If string it will be use as replacement character * or an array of options. * @return string * @see setTransliterator() @@ -1163,23 +1172,25 @@ public static function slug($string, $options = []) $options += [ 'replacement' => '-', 'transliteratorId' => null, - 'preserve' => null + 'preserve' => null, ]; if ($options['transliteratorId'] !== false) { $string = static::transliterate($string, $options['transliteratorId']); } - $regex = '^\s\p{Ll}\p{Lm}\p{Lo}\p{Lt}\p{Lu}\p{Nd}'; + $regex = '^\p{Ll}\p{Lm}\p{Lo}\p{Lt}\p{Lu}\p{Nd}'; if ($options['preserve']) { $regex .= preg_quote($options['preserve'], '/'); } - $quotedReplacement = preg_quote($options['replacement'], '/'); + $quotedReplacement = preg_quote((string)$options['replacement'], '/'); $map = [ - '/[' . $regex . ']/mu' => ' ', - '/[\s]+/mu' => $options['replacement'], + '/[' . $regex . ']/mu' => $options['replacement'], sprintf('/^[%s]+|[%s]+$/', $quotedReplacement, $quotedReplacement) => '', ]; + if (is_string($options['replacement']) && strlen($options['replacement']) > 0) { + $map[sprintf('/[%s]+/mu', $quotedReplacement)] = $options['replacement']; + } $string = preg_replace(array_keys($map), $map, $string); return $string; diff --git a/app/vendor/cakephp/cakephp/src/Utility/Xml.php b/app/vendor/cakephp/cakephp/src/Utility/Xml.php index 2ab5c37c1..e7cd6a3ee 100644 --- a/app/vendor/cakephp/cakephp/src/Utility/Xml.php +++ b/app/vendor/cakephp/cakephp/src/Utility/Xml.php @@ -28,7 +28,6 @@ */ class Xml { - /** * Initialize SimpleXMLElement or DOMDocument from a given XML string, file path, URL or array. * @@ -59,7 +58,7 @@ class Xml * * $http = new Client(); * $response = $http->get('http://example.com/example.xml'); - * $xml = Xml::build($response->body()); + * $xml = Xml::build($response->getStringBody()); * ``` * * Building from an array: @@ -96,7 +95,7 @@ class Xml * * If using array as input, you can pass `options` from Xml::fromArray. * - * @param string|array $input XML string, a path to a file, a URL or an array + * @param string|array|object $input XML string, a path to a file, a URL or an array * @param array $options The options to use * @return \SimpleXMLElement|\DOMDocument SimpleXMLElement or DOMDocument * @throws \Cake\Utility\Exception\XmlException @@ -124,7 +123,12 @@ public static function build($input, array $options = []) } if (!is_string($input)) { - throw new XmlException('Invalid input.'); + $type = gettype($input); + throw new XmlException("Invalid input. {$type} cannot be parsed as XML."); + } + + if (strpos($input, '<') !== false) { + return static::_loadXml($input, $options); } throw new XmlException('XML cannot be read.'); @@ -247,8 +251,8 @@ public static function loadHtml($input, $options = []) * * `description` * - * @param array|\Cake\Collection\Collection $input Array with data or a collection instance. - * @param string|array $options The options to use or a string to use as format. + * @param array|object $input Array with data or a collection instance. + * @param array $options The options to use. * @return \SimpleXMLElement|\DOMDocument SimpleXMLElement or DOMDocument * @throws \Cake\Utility\Exception\XmlException */ @@ -273,7 +277,7 @@ public static function fromArray($input, $options = []) 'version' => '1.0', 'encoding' => mb_internal_encoding(), 'return' => 'simplexml', - 'pretty' => false + 'pretty' => false, ]; $options += $defaults; @@ -295,7 +299,7 @@ public static function fromArray($input, $options = []) * Recursive method to create childs from array * * @param \DOMDocument $dom Handler to DOMDocument - * @param \DOMElement $node Handler to DOMElement (child) + * @param \DOMDocument|\DOMElement $node Handler to DOMElement (child) * @param array $data Array of data to append to the $node. * @param string $format Either 'attributes' or 'tags'. This determines where nested keys go. * @return void @@ -320,7 +324,7 @@ protected static function _fromArray($dom, $node, &$data, $format) } $isNamespace = strpos($key, 'xmlns:'); if ($isNamespace !== false) { - $node->setAttributeNS('http://www.w3.org/2000/xmlns/', $key, $value); + $node->setAttributeNS('http://www.w3.org/2000/xmlns/', $key, (string)$value); continue; } if ($key[0] !== '@' && $format === 'tags') { @@ -329,7 +333,7 @@ protected static function _fromArray($dom, $node, &$data, $format) // https://www.w3.org/TR/REC-xml/#syntax // https://bugs.php.net/bug.php?id=36795 $child = $dom->createElement($key, ''); - $child->appendChild(new DOMText($value)); + $child->appendChild(new DOMText((string)$value)); } else { $child = $dom->createElement($key, $value); } @@ -339,7 +343,7 @@ protected static function _fromArray($dom, $node, &$data, $format) $key = substr($key, 1); } $attribute = $dom->createAttribute($key); - $attribute->appendChild($dom->createTextNode($value)); + $attribute->appendChild($dom->createTextNode((string)$value)); $node->appendChild($attribute); } } else { diff --git a/app/vendor/cakephp/cakephp/src/Utility/composer.json b/app/vendor/cakephp/cakephp/src/Utility/composer.json index 4c5c8f1eb..bf5d6842b 100644 --- a/app/vendor/cakephp/cakephp/src/Utility/composer.json +++ b/app/vendor/cakephp/cakephp/src/Utility/composer.json @@ -25,7 +25,7 @@ "source": "https://github.com/cakephp/utility" }, "require": { - "php": ">=5.6.0", + "php": ">=5.6.0,<8.0.0", "cakephp/core": "^3.6.0" }, "suggest": { diff --git a/app/vendor/cakephp/cakephp/src/Validation/README.md b/app/vendor/cakephp/cakephp/src/Validation/README.md index 179665169..45c57a77a 100644 --- a/app/vendor/cakephp/cakephp/src/Validation/README.md +++ b/app/vendor/cakephp/cakephp/src/Validation/README.md @@ -26,7 +26,7 @@ $validator ->requirePresence('comment') ->notEmpty('comment', 'You need to give a comment.'); -$errors = $validator->errors($_POST); +$errors = $validator->validate($_POST); if (!empty($errors)) { // display errors. } @@ -34,4 +34,4 @@ if (!empty($errors)) { ## Documentation -Please make sure you check the [official documentation](https://book.cakephp.org/3.0/en/core-libraries/validation.html) +Please make sure you check the [official documentation](https://book.cakephp.org/3/en/core-libraries/validation.html) diff --git a/app/vendor/cakephp/cakephp/src/Validation/RulesProvider.php b/app/vendor/cakephp/cakephp/src/Validation/RulesProvider.php index efdee0db5..382c92ada 100644 --- a/app/vendor/cakephp/cakephp/src/Validation/RulesProvider.php +++ b/app/vendor/cakephp/cakephp/src/Validation/RulesProvider.php @@ -19,10 +19,11 @@ /** * A Proxy class used to remove any extra arguments when the user intended to call * a method in another class that is not aware of validation providers signature + * + * @method bool extension(mixed $check, array $extensions, array $context = []) */ class RulesProvider { - /** * The class/object to proxy. * @@ -59,7 +60,7 @@ public function __construct($class = Validation::class) * * @param string $method the validation method to call * @param array $arguments the list of arguments to pass to the method - * @return bool whether or not the validation rule passed + * @return bool Whether or not the validation rule passed */ public function __call($method, $arguments) { diff --git a/app/vendor/cakephp/cakephp/src/Validation/ValidatableInterface.php b/app/vendor/cakephp/cakephp/src/Validation/ValidatableInterface.php index 35780823c..73a05297e 100644 --- a/app/vendor/cakephp/cakephp/src/Validation/ValidatableInterface.php +++ b/app/vendor/cakephp/cakephp/src/Validation/ValidatableInterface.php @@ -19,7 +19,6 @@ */ interface ValidatableInterface { - /** * Validates the internal properties using a validator object and returns any * validation errors found. diff --git a/app/vendor/cakephp/cakephp/src/Validation/Validation.php b/app/vendor/cakephp/cakephp/src/Validation/Validation.php index 82312df31..446518e21 100644 --- a/app/vendor/cakephp/cakephp/src/Validation/Validation.php +++ b/app/vendor/cakephp/cakephp/src/Validation/Validation.php @@ -30,54 +30,73 @@ */ class Validation { - /** * Default locale + * + * @var string */ const DEFAULT_LOCALE = 'en_US'; /** * Same as operator. + * + * @var string */ const COMPARE_SAME = '==='; /** * Not same as comparison operator. + * + * @var string */ const COMPARE_NOT_SAME = '!=='; /** * Equal to comparison operator. + * + * @var string */ const COMPARE_EQUAL = '=='; /** * Not equal to comparison operator. + * + * @var string */ const COMPARE_NOT_EQUAL = '!='; /** * Greater than comparison operator. + * + * @var string */ const COMPARE_GREATER = '>'; /** * Greater than or equal to comparison operator. + * + * @var string */ const COMPARE_GREATER_OR_EQUAL = '>='; /** * Less than comparison operator. + * + * @var string */ const COMPARE_LESS = '<'; /** * Less than or equal to comparison operator. + * + * @var string */ const COMPARE_LESS_OR_EQUAL = '<='; /** * Datetime ISO8601 format + * + * @var string */ const DATETIME_ISO8601 = 'iso8601'; @@ -123,7 +142,7 @@ public static function notEmpty($check) * * Returns true if string contains something other than whitespace * - * @param string $check Value to check + * @param mixed $check Value to check * @return bool Success */ public static function notBlank($check) @@ -136,40 +155,81 @@ public static function notBlank($check) } /** - * Checks that a string contains only integer or letters + * Checks that a string contains only integer or letters. * - * Returns true if string contains only integer or letters + * This method's definition of letters and integers includes unicode characters. + * Use `asciiAlphaNumeric()` if you want to exclude unicode. * * @param string $check Value to check * @return bool Success */ public static function alphaNumeric($check) { - if (empty($check) && $check !== '0') { + if ((empty($check) && $check !== '0') || !is_scalar($check)) { return false; } return self::_check($check, '/^[\p{Ll}\p{Lm}\p{Lo}\p{Lt}\p{Lu}\p{Nd}]+$/Du'); } + /** + * Checks that a doesn't contain any alpha numeric characters + * + * This method's definition of letters and integers includes unicode characters. + * Use `notAsciiAlphaNumeric()` if you want to exclude ascii only. + * + * @param mixed $check Value to check + * @return bool Success + */ + public static function notAlphaNumeric($check) + { + return !static::alphaNumeric($check); + } + + /** + * Checks that a string contains only ascii integer or letters. + * + * @param mixed $check Value to check + * @return bool Success + */ + public static function asciiAlphaNumeric($check) + { + if ((empty($check) && $check !== '0') || !is_scalar($check)) { + return false; + } + + return self::_check($check, '/^[[:alnum:]]+$/'); + } + + /** + * Checks that a doesn't contain any non-ascii alpha numeric characters + * + * @param mixed $check Value to check + * @return bool Success + */ + public static function notAsciiAlphaNumeric($check) + { + return !static::asciiAlphaNumeric($check); + } + /** * Checks that a string length is within specified range. * Spaces are included in the character count. * Returns true if string matches value min, max, or between min and max, * - * @param string $check Value to check for length + * @param mixed $check Value to check for length * @param int $min Minimum value in range (inclusive) * @param int $max Maximum value in range (inclusive) * @return bool Success */ public static function lengthBetween($check, $min, $max) { - if (!is_string($check)) { + if (!is_scalar($check)) { return false; } - $length = mb_strlen($check); + $length = mb_strlen((string)$check); - return ($length >= $min && $length <= $max); + return $length >= $min && $length <= $max; } /** @@ -216,9 +276,9 @@ public static function cc($check, $type = 'fast', $deep = false, $regex = null) * Validation of credit card numbers. * Returns true if $check is in the proper credit card format. * - * @param string $check credit card number to validate - * @param string|array $type 'all' may be passed as a string, defaults to fast which checks format of most major credit cards - * if an array is used only the values of the array are checked. + * @param mixed $check credit card number to validate + * @param string|string[] $type 'all' may be passed as a string, defaults to fast which checks format of + * most major credit cards if an array is used only the values of the array are checked. * Example: ['amex', 'bankcard', 'maestro'] * @param bool $deep set to true this will check the Luhn algorithm of the credit card. * @param string|null $regex A custom regex can also be passed, this will be used instead of the defined regex values @@ -227,11 +287,11 @@ public static function cc($check, $type = 'fast', $deep = false, $regex = null) */ public static function creditCard($check, $type = 'fast', $deep = false, $regex = null) { - if (!is_scalar($check)) { + if (!(is_string($check) || is_int($check))) { return false; } - $check = str_replace(['-', ' '], '', $check); + $check = str_replace(['-', ' '], '', (string)$check); if (mb_strlen($check) < 13) { return false; } @@ -253,9 +313,9 @@ public static function creditCard($check, $type = 'fast', $deep = false, $regex 'solo' => '/^(6334[5-9][0-9]|6767[0-9]{2})\\d{10}(\\d{2,3})?$/', 'switch' => '/^(?:49(03(0[2-9]|3[5-9])|11(0[1-2]|7[4-9]|8[1-2])|36[0-9]{2})\\d{10}(\\d{2,3})?)|(?:564182\\d{10}(\\d{2,3})?)|(6(3(33[0-4][0-9])|759[0-9]{2})\\d{10}(\\d{2,3})?)$/', 'visa' => '/^4\\d{12}(\\d{3})?$/', - 'voyager' => '/^8699[0-9]{11}$/' + 'voyager' => '/^8699[0-9]{11}$/', ], - 'fast' => '/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6011[0-9]{12}|3(?:0[0-5]|[68][0-9])[0-9]{11}|3[47][0-9]{13})$/' + 'fast' => '/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6011[0-9]{12}|3(?:0[0-5]|[68][0-9])[0-9]{11}|3[47][0-9]{13})$/', ]; if (is_array($type)) { @@ -288,7 +348,7 @@ public static function creditCard($check, $type = 'fast', $deep = false, $regex /** * Used to check the count of a given value of type array or Countable. * - * @param array|\Countable $check The value to check the count on. + * @param mixed $check The value to check the count on. * @param string $operator Can be either a word or operand * is greater >, is less <, greater or equal >= * less or equal <=, is less <, equal to ==, not equal != @@ -307,11 +367,11 @@ public static function numElements($check, $operator, $expectedCount) /** * Used to compare 2 numeric values. * - * @param string $check1 The left value to compare. + * @param string|int $check1 The left value to compare. * @param string $operator Can be either a word or operand * is greater >, is less <, greater or equal >= * less or equal <=, is less <, equal to ==, not equal != - * @param int $check2 The right value to compare. + * @param string|int $check2 The right value to compare. * @return bool Success */ public static function comparison($check1, $operator, $check2) @@ -436,7 +496,7 @@ public static function compareWith($check, $field, $context) */ public static function compareFields($check, $field, $operator, $context) { - if (!isset($context['data'][$field])) { + if (!isset($context['data']) || !array_key_exists($field, $context['data'])) { return false; } @@ -451,6 +511,7 @@ public static function compareFields($check, $field, $operator, $context) * @param string $check Value to check * @param int $count Number of non-alphanumerics to check for * @return bool Success + * @deprecated 3.9.0 Use notAlphaNumeric() instead. Will be removed in 5.0 */ public static function containsNonAlphaNumeric($check, $count = 1) { @@ -485,7 +546,7 @@ public static function custom($check, $regex = null) * Date validation, determines if the string passed is a valid date. * keys that expect full month, day and year will validate leap years. * - * Years are valid from 1800 to 2999. + * Years are valid from 0001 to 2999. * * ### Formats: * @@ -499,7 +560,7 @@ public static function custom($check, $regex = null) * - `ym` 2006/12 or 06/12 separators can be a space, period, dash, forward slash * - `y` 2006 just the year without any separators * - * @param string|\DateTimeInterface $check a valid date string/object + * @param mixed $check a valid date string/object * @param string|array $format Use a string or an array of the keys above. * Arrays should be passed as ['dmy', 'mdy', etc] * @param string|null $regex If a custom regular expression is used this is the only validation that will occur. @@ -523,29 +584,35 @@ public static function date($check, $format = 'ymd', $regex = null) } $month = '(0[123456789]|10|11|12)'; $separator = '([- /.])'; - $fourDigitYear = '(([1][8-9][0-9][0-9])|([2][0-9][0-9][0-9]))'; - $twoDigitYear = '([0-9]{2})'; + // Don't allow 0000, but 0001-2999 are ok. + $fourDigitYear = '(?:(?!0000)[012]\d{3})'; + $twoDigitYear = '(?:\d{2})'; $year = '(?:' . $fourDigitYear . '|' . $twoDigitYear . ')'; + // 2 or 4 digit leap year sub-pattern + $leapYear = '(?:(?:(?:(?!0000)[012]\\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00)))'; + // 4 digit leap year sub-pattern + $fourDigitLeapYear = '(?:(?:(?:(?!0000)[012]\\d)(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00)))'; + $regex['dmy'] = '%^(?:(?:31(\\/|-|\\.|\\x20)(?:0?[13578]|1[02]))\\1|(?:(?:29|30)' . - $separator . '(?:0?[1,3-9]|1[0-2])\\2))(?:(?:1[6-9]|[2-9]\\d)?\\d{2})$|^(?:29' . - $separator . '0?2\\3(?:(?:(?:1[6-9]|[2-9]\\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))$|^(?:0?[1-9]|1\\d|2[0-8])' . - $separator . '(?:(?:0?[1-9])|(?:1[0-2]))\\4(?:(?:1[6-9]|[2-9]\\d)?\\d{2})$%'; + $separator . '(?:0?[1,3-9]|1[0-2])\\2))' . $year . '$|^(?:29' . + $separator . '0?2\\3' . $leapYear . ')$|^(?:0?[1-9]|1\\d|2[0-8])' . + $separator . '(?:(?:0?[1-9])|(?:1[0-2]))\\4' . $year . '$%'; $regex['mdy'] = '%^(?:(?:(?:0?[13578]|1[02])(\\/|-|\\.|\\x20)31)\\1|(?:(?:0?[13-9]|1[0-2])' . - $separator . '(?:29|30)\\2))(?:(?:1[6-9]|[2-9]\\d)?\\d{2})$|^(?:0?2' . $separator . '29\\3(?:(?:(?:1[6-9]|[2-9]\\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))$|^(?:(?:0?[1-9])|(?:1[0-2]))' . - $separator . '(?:0?[1-9]|1\\d|2[0-8])\\4(?:(?:1[6-9]|[2-9]\\d)?\\d{2})$%'; + $separator . '(?:29|30)\\2))' . $year . '$|^(?:0?2' . $separator . '29\\3' . $leapYear . ')$|^(?:(?:0?[1-9])|(?:1[0-2]))' . + $separator . '(?:0?[1-9]|1\\d|2[0-8])\\4' . $year . '$%'; - $regex['ymd'] = '%^(?:(?:(?:(?:(?:1[6-9]|[2-9]\\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00)))' . - $separator . '(?:0?2\\1(?:29)))|(?:(?:(?:1[6-9]|[2-9]\\d)?\\d{2})' . + $regex['ymd'] = '%^(?:(?:' . $leapYear . + $separator . '(?:0?2\\1(?:29)))|(?:' . $year . $separator . '(?:(?:(?:0?[13578]|1[02])\\2(?:31))|(?:(?:0?[1,3-9]|1[0-2])\\2(29|30))|(?:(?:0?[1-9])|(?:1[0-2]))\\2(?:0?[1-9]|1\\d|2[0-8]))))$%'; - $regex['dMy'] = '/^((31(?!\\ (Feb(ruary)?|Apr(il)?|June?|(Sep(?=\\b|t)t?|Nov)(ember)?)))|((30|29)(?!\\ Feb(ruary)?))|(29(?=\\ Feb(ruary)?\\ (((1[6-9]|[2-9]\\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00)))))|(0?[1-9])|1\\d|2[0-8])\\ (Jan(uary)?|Feb(ruary)?|Ma(r(ch)?|y)|Apr(il)?|Ju((ly?)|(ne?))|Aug(ust)?|Oct(ober)?|(Sep(?=\\b|t)t?|Nov|Dec)(ember)?)\\ ((1[6-9]|[2-9]\\d)\\d{2})$/'; + $regex['dMy'] = '/^((31(?!\\ (Feb(ruary)?|Apr(il)?|June?|(Sep(?=\\b|t)t?|Nov)(ember)?)))|((30|29)(?!\\ Feb(ruary)?))|(29(?=\\ Feb(ruary)?\\ ' . $fourDigitLeapYear . '))|(0?[1-9])|1\\d|2[0-8])\\ (Jan(uary)?|Feb(ruary)?|Ma(r(ch)?|y)|Apr(il)?|Ju((ly?)|(ne?))|Aug(ust)?|Oct(ober)?|(Sep(?=\\b|t)t?|Nov|Dec)(ember)?)\\ ' . $fourDigitYear . '$/'; - $regex['Mdy'] = '/^(?:(((Jan(uary)?|Ma(r(ch)?|y)|Jul(y)?|Aug(ust)?|Oct(ober)?|Dec(ember)?)\\ 31)|((Jan(uary)?|Ma(r(ch)?|y)|Apr(il)?|Ju((ly?)|(ne?))|Aug(ust)?|Oct(ober)?|(Sep)(tember)?|(Nov|Dec)(ember)?)\\ (0?[1-9]|([12]\\d)|30))|(Feb(ruary)?\\ (0?[1-9]|1\\d|2[0-8]|(29(?=,?\\ ((1[6-9]|[2-9]\\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00)))))))\\,?\\ ((1[6-9]|[2-9]\\d)\\d{2}))$/'; + $regex['Mdy'] = '/^(?:(((Jan(uary)?|Ma(r(ch)?|y)|Jul(y)?|Aug(ust)?|Oct(ober)?|Dec(ember)?)\\ 31)|((Jan(uary)?|Ma(r(ch)?|y)|Apr(il)?|Ju((ly?)|(ne?))|Aug(ust)?|Oct(ober)?|(Sep)(tember)?|(Nov|Dec)(ember)?)\\ (0?[1-9]|([12]\\d)|30))|(Feb(ruary)?\\ (0?[1-9]|1\\d|2[0-8]|(29(?=,?\\ ' . $fourDigitLeapYear . ')))))\\,?\\ ' . $fourDigitYear . ')$/'; $regex['My'] = '%^(Jan(uary)?|Feb(ruary)?|Ma(r(ch)?|y)|Apr(il)?|Ju((ly?)|(ne?))|Aug(ust)?|Oct(ober)?|(Sep(?=\\b|t)t?|Nov|Dec)(ember)?)' . - $separator . '((1[6-9]|[2-9]\\d)\\d{2})$%'; + $separator . $fourDigitYear . '$%'; $regex['my'] = '%^(' . $month . $separator . $year . ')$%'; $regex['ym'] = '%^(' . $year . $separator . $month . ')$%'; @@ -566,10 +633,11 @@ public static function date($check, $format = 'ymd', $regex = null) * * All values matching the "date" core validation rule, and the "time" one will be valid * - * @param string|\DateTimeInterface $check Value to check + * @param mixed $check Value to check * @param string|array $dateFormat Format of the date part. See Validation::date() for more information. - * Or `Validation::DATETIME_ISO8601` to valid an ISO8601 datetime value - * @param string|null $regex Regex for the date part. If a custom regular expression is used this is the only validation that will occur. + * Or `Validation::DATETIME_ISO8601` to validate an ISO8601 datetime value. + * @param string|null $regex Regex for the date part. If a custom regular expression is used + * this is the only validation that will occur. * @return bool True if the value is valid, false otherwise * @see \Cake\Validation\Validation::date() * @see \Cake\Validation\Validation::time() @@ -582,6 +650,9 @@ public static function datetime($check, $dateFormat = 'ymd', $regex = null) if (is_object($check)) { return false; } + if (is_array($dateFormat) && count($dateFormat) === 1) { + $dateFormat = reset($dateFormat); + } if ($dateFormat === static::DATETIME_ISO8601 && !static::iso8601($check)) { return false; } @@ -610,10 +681,8 @@ public static function datetime($check, $dateFormat = 'ymd', $regex = null) * Validates an iso8601 datetime format * ISO8601 recognize datetime like 2019 as a valid date. To validate and check date integrity, use @see \Cake\Validation\Validation::datetime() * - * @param string|\DateTimeInterface $check Value to check - * + * @param mixed $check Value to check * @return bool True if the value is valid, false otherwise - * * @see Regex credits: https://www.myintervals.com/blog/2009/05/20/iso-8601-date-validation-that-doesnt-suck/ */ public static function iso8601($check) @@ -632,8 +701,7 @@ public static function iso8601($check) /** * Time validation, determines if the string passed is a valid time. - * Validates time as 24hr (HH:MM) or am/pm ([H]H:MM[a|p]m) - * Does not allow/validate seconds. + * Validates time as 24hr (HH:MM[:SS]) or am/pm ([H]H[:MM][:SS][a|p]m) * * @param string|\DateTimeInterface $check a valid time string/object * @return bool Success @@ -647,7 +715,7 @@ public static function time($check) $check = static::_getDateString($check); } - return static::_check($check, '%^((0?[1-9]|1[012])(:[0-5]\d){0,2} ?([AP]M|[ap]m))$|^([01]\d|2[0-3])(:[0-5]\d){0,2}$%'); + return static::_check($check, '%^((0?[1-9]|1[012])(:[0-5]\d){0,2} ?([AP]M|[ap]m))$|^([01]\d|2[0-3])(:[0-5]\d){1,2}$%'); } /** @@ -659,7 +727,9 @@ public static function time($check) * @param string|int|null $format any format accepted by IntlDateFormatter * @return bool Success * @throws \InvalidArgumentException when unsupported $type given - * @see \Cake\I18n\Time::parseDate(), \Cake\I18n\Time::parseTime(), \Cake\I18n\Time::parseDateTime() + * @see \Cake\I18n\Time::parseDate() + * @see \Cake\I18n\Time::parseTime() + * @see \Cake\I18n\Time::parseDateTime() */ public static function localizedTime($check, $type = 'datetime', $format = null) { @@ -745,13 +815,17 @@ public static function falsey($check, array $falseyValues = []) * - true => Any number of decimal places greater than 0, or a float|double. The '.' is required. * - 1..N => Exactly that many number of decimal places. The '.' is required. * - * @param float $check The value the test for decimal. - * @param int|bool|null $places Decimal places. + * @param mixed $check The value the test for decimal. + * @param int|true|null $places Decimal places. * @param string|null $regex If a custom regular expression is used, this is the only validation that will occur. * @return bool Success */ public static function decimal($check, $places = null, $regex = null) { + if (!is_scalar($check)) { + return false; + } + if ($regex === null) { $lnum = '[0-9]+'; $dnum = "[0-9]*[\.]{$lnum}"; @@ -769,6 +843,8 @@ public static function decimal($check, $places = null, $regex = null) $places = '[0-9]{' . $places . '}'; $dnum = "(?:[0-9]*[\.]{$places}|{$lnum}[\.]{$places})"; $regex = "/^{$sign}{$dnum}{$exp}$/"; + } else { + return false; } } @@ -778,6 +854,13 @@ public static function decimal($check, $places = null, $regex = null) $decimalPoint = $formatter->getSymbol(NumberFormatter::DECIMAL_SEPARATOR_SYMBOL); $groupingSep = $formatter->getSymbol(NumberFormatter::GROUPING_SEPARATOR_SYMBOL); + // There are two types of non-breaking spaces - we inject a space to account for human input + if ($groupingSep == "\xc2\xa0" || $groupingSep == "\xe2\x80\xaf") { + $check = str_replace([' ', $groupingSep, $decimalPoint], ['', '', '.'], $check); + } else { + $check = str_replace([$groupingSep, $decimalPoint], ['', '.'], $check); + } + $check = str_replace([$groupingSep, $decimalPoint], ['', '.'], $check); return static::_check($check, $regex); @@ -789,7 +872,7 @@ public static function decimal($check, $places = null, $regex = null) * Only uses getmxrr() checking for deep validation, or * any PHP version on a non-windows distribution * - * @param string $check Value to check + * @param mixed $check Value to check * @param bool $deep Perform a deeper validation (if true), by also checking availability of host * @param string|null $regex Regex to use (if none it will use built in regex) * @return bool Success @@ -838,7 +921,7 @@ public static function equalTo($check, $comparedTo) * Checks that value has a valid file extension. * * @param string|array|\Psr\Http\Message\UploadedFileInterface $check Value to check - * @param array $extensions file extensions to allow. By default extensions are 'gif', 'jpeg', 'png', 'jpg' + * @param string[] $extensions file extensions to allow. By default extensions are 'gif', 'jpeg', 'png', 'jpg' * @return bool Success */ public static function extension($check, $extensions = ['gif', 'jpeg', 'png', 'jpg']) @@ -864,12 +947,16 @@ public static function extension($check, $extensions = ['gif', 'jpeg', 'png', 'j /** * Validation of an IP address. * - * @param string $check The string to test. + * @param mixed $check The string to test. * @param string $type The IP Protocol version to validate against * @return bool Success */ public static function ip($check, $type = 'both') { + if (!is_string($check)) { + return false; + } + $type = strtolower($type); $flags = 0; if ($type === 'ipv4') { @@ -885,7 +972,7 @@ public static function ip($check, $type = 'both') /** * Checks whether the length of a string (in characters) is greater or equal to a minimal length. * - * @param string $check The string to test + * @param mixed $check The string to test * @param int $min The minimal string length * @return bool Success */ @@ -895,13 +982,13 @@ public static function minLength($check, $min) return false; } - return mb_strlen($check) >= $min; + return mb_strlen((string)$check) >= $min; } /** * Checks whether the length of a string (in characters) is smaller or equal to a maximal length. * - * @param string $check The string to test + * @param mixed $check The string to test * @param int $max The maximal string length * @return bool Success */ @@ -911,13 +998,13 @@ public static function maxLength($check, $max) return false; } - return mb_strlen($check) <= $max; + return mb_strlen((string)$check) <= $max; } /** * Checks whether the length of a string (in bytes) is greater or equal to a minimal length. * - * @param string $check The string to test + * @param mixed $check The string to test * @param int $min The minimal string length (in bytes) * @return bool Success */ @@ -927,13 +1014,13 @@ public static function minLengthBytes($check, $min) return false; } - return strlen($check) >= $min; + return strlen((string)$check) >= $min; } /** * Checks whether the length of a string (in bytes) is smaller or equal to a maximal length. * - * @param string $check The string to test + * @param mixed $check The string to test * @param int $max The maximal string length * @return bool Success */ @@ -943,13 +1030,13 @@ public static function maxLengthBytes($check, $max) return false; } - return strlen($check) <= $max; + return strlen((string)$check) <= $max; } /** * Checks that a value is a monetary amount. * - * @param string $check Value to check + * @param mixed $check Value to check * @param string $symbolPosition Where symbol is located (left/right) * @return bool Success */ @@ -974,7 +1061,7 @@ public static function money($check, $symbolPosition = 'left') * - max => maximum number of non-zero choices that can be made * - min => minimum number of non-zero choices that can be made * - * @param array $check Value to check + * @param mixed $check Value to check * @param array $options Options for the check. * @param bool $caseInsensitive Set to true for case insensitive comparison. * @return bool Success @@ -1017,7 +1104,7 @@ public static function multiple($check, array $options = [], $caseInsensitive = /** * Checks if a value is numeric. * - * @param string $check Value to check + * @param mixed $check Value to check * @return bool Success */ public static function numeric($check) @@ -1028,7 +1115,7 @@ public static function numeric($check) /** * Checks if a value is a natural number. * - * @param string $check Value to check + * @param mixed $check Value to check * @param bool $allowZero Set true to allow zero, defaults to false * @return bool Success * @see https://en.wikipedia.org/wiki/Natural_number @@ -1064,7 +1151,7 @@ public static function range($check, $lower = null, $upper = null) return ($check >= $lower && $check <= $upper); } - return is_finite($check); + return is_finite((float)$check); } /** @@ -1080,13 +1167,17 @@ public static function range($check, $lower = null, $upper = null) * - an optional query string (get parameters) * - an optional fragment (anchor tag) as defined in RFC 3986 * - * @param string $check Value to check + * @param mixed $check Value to check * @param bool $strict Require URL to be prefixed by a valid scheme (one of http(s)/ftp(s)/file/news/gopher) * @return bool Success * @link https://tools.ietf.org/html/rfc3986 */ public static function url($check, $strict = false) { + if (!is_string($check)) { + return false; + } + static::_populateIp(); $emoji = '\x{1F190}-\x{1F9EF}'; @@ -1107,16 +1198,19 @@ public static function url($check, $strict = false) /** * Checks if a value is in a given list. Comparison is case sensitive by default. * - * @param string $check Value to check. + * @param mixed $check Value to check. * @param string[] $list List to check against. * @param bool $caseInsensitive Set to true for case insensitive comparison. * @return bool Success. */ public static function inList($check, array $list, $caseInsensitive = false) { + if (!is_scalar($check)) { + return false; + } if ($caseInsensitive) { $list = array_map('mb_strtolower', $list); - $check = mb_strtolower($check); + $check = mb_strtolower((string)$check); } else { $list = array_map('strval', $list); } @@ -1147,7 +1241,7 @@ public static function userDefined($check, $object, $method, $args = null) /** * Checks that a value is a valid UUID - https://tools.ietf.org/html/rfc4122 * - * @param string $check Value to check + * @param mixed $check Value to check * @return bool Success */ public static function uuid($check) @@ -1160,19 +1254,19 @@ public static function uuid($check) /** * Runs a regular expression match. * - * @param string $check Value to check against the $regex expression + * @param mixed $check Value to check against the $regex expression * @param string $regex Regular expression * @return bool Success of match */ protected static function _check($check, $regex) { - return is_string($regex) && is_scalar($check) && preg_match($regex, $check); + return is_scalar($check) && preg_match($regex, (string)$check); } /** * Luhn algorithm * - * @param string|array $check Value to check. + * @param mixed $check Value to check. * @return bool Success * @see https://en.wikipedia.org/wiki/Luhn_algorithm */ @@ -1182,10 +1276,11 @@ public static function luhn($check) return false; } $sum = 0; + $check = (string)$check; $length = strlen($check); for ($position = 1 - ($length % 2); $position < $length; $position += 2) { - $sum += $check[$position]; + $sum += (int)$check[$position]; } for ($position = ($length % 2); $position < $length; $position += 2) { @@ -1241,7 +1336,7 @@ public static function mimeType($check, $mimeTypes = []) $mimeTypes[$key] = strtolower($val); } - return in_array(strtolower($mime), $mimeTypes); + return in_array(strtolower($mime), $mimeTypes, true); } /** @@ -1249,7 +1344,7 @@ public static function mimeType($check, $mimeTypes = []) * we accept. * * @param string|array|\Psr\Http\Message\UploadedFileInterface $check The data to read a filename out of. - * @return string|bool Either the filename or false on failure. + * @return string|false Either the filename or false on failure. */ protected static function getFilename($check) { @@ -1339,7 +1434,7 @@ public static function uploadError($check, $allowNoFile = false) * - `optional` - Whether or not this file is optional. Defaults to false. * If true a missing file will pass the validator regardless of other constraints. * - * @param array|\Psr\Http\Message\UploadedFileInterface $file The uploaded file data from PHP. + * @param mixed $file The uploaded file data from PHP. * @param array $options An array of options for the validation. * @return bool */ @@ -1362,7 +1457,7 @@ public static function uploadedFile($file, array $options = []) if (is_array($file)) { $keys = ['error', 'name', 'size', 'tmp_name', 'type']; ksort($file); - if (array_keys($file) != $keys) { + if (array_keys($file) !== $keys) { return false; } $error = (int)$file['error']; @@ -1391,7 +1486,7 @@ public static function uploadedFile($file, array $options = []) /** * Validates the size of an uploaded image. * - * @param array|\Psr\Http\Message\UploadedFileInterface $file The uploaded file data from PHP. + * @param mixed $file The uploaded file data from PHP. * @param array $options Options to validate width and height. * @return bool * @throws \InvalidArgumentException @@ -1440,17 +1535,17 @@ public static function imageWidth($file, $operator, $width) return self::imageSize($file, [ 'width' => [ $operator, - $width - ] + $width, + ], ]); } /** - * Validates the image width. + * Validates the image height. * * @param array $file The uploaded file data from PHP. * @param string $operator Comparison operator. - * @param int $height Min or max width. + * @param int $height Min or max height. * @return bool */ public static function imageHeight($file, $operator, $height) @@ -1458,8 +1553,8 @@ public static function imageHeight($file, $operator, $height) return self::imageSize($file, [ 'height' => [ $operator, - $height - ] + $height, + ], ]); } @@ -1476,15 +1571,19 @@ public static function imageHeight($file, $operator, $height) * - `format` - By default `both`, can be `long` and `lat` as well to validate * only a part of the coordinate. * - * @param string $value Geographic location as string + * @param mixed $value Geographic location as string * @param array $options Options for the validation logic. * @return bool */ public static function geoCoordinate($value, array $options = []) { + if (!is_scalar($value)) { + return false; + } + $options += [ 'format' => 'both', - 'type' => 'latLong' + 'type' => 'latLong', ]; if ($options['type'] !== 'latLong') { throw new RuntimeException(sprintf( @@ -1500,13 +1599,13 @@ public static function geoCoordinate($value, array $options = []) $pattern = '/^' . self::$_pattern['latitude'] . '$/'; } - return (bool)preg_match($pattern, $value); + return (bool)preg_match($pattern, (string)$value); } /** * Convenience method for latitude validation. * - * @param string $value Latitude as string + * @param mixed $value Latitude as string * @param array $options Options for the validation logic. * @return bool * @link https://en.wikipedia.org/wiki/Latitude @@ -1522,7 +1621,7 @@ public static function latitude($value, array $options = []) /** * Convenience method for longitude validation. * - * @param string $value Latitude as string + * @param mixed $value Latitude as string * @param array $options Options for the validation logic. * @return bool * @link https://en.wikipedia.org/wiki/Longitude @@ -1540,7 +1639,7 @@ public static function longitude($value, array $options = []) * * This method will reject all non-string values. * - * @param string $value The value to check + * @param mixed $value The value to check * @return bool */ public static function ascii($value) @@ -1563,7 +1662,7 @@ public static function ascii($value) * MySQL's older utf8 encoding type does not allow characters above * the basic multilingual plane. Defaults to false. * - * @param string $value The value to check + * @param mixed $value The value to check * @param array $options An array of options. See above for the supported options. * @return bool */ @@ -1586,25 +1685,26 @@ public static function utf8($value, array $options = []) * This method will accept strings that contain only integer data * as well. * - * @param string $value The value to check + * @param mixed $value The value to check * @return bool */ public static function isInteger($value) { - if (!is_numeric($value) || is_float($value)) { - return false; - } if (is_int($value)) { return true; } + if (!is_string($value) || !is_numeric($value)) { + return false; + } + return (bool)preg_match('/^-?[0-9]+$/', $value); } /** * Check that the input value is an array. * - * @param array $value The value to check + * @param mixed $value The value to check * @return bool */ public static function isArray($value) @@ -1629,7 +1729,7 @@ public static function isScalar($value) /** * Check that the input value is a 6 digits hex color. * - * @param string|array $check The value to check + * @param mixed $check The value to check * @return bool Success */ public static function hexColor($check) @@ -1642,13 +1742,15 @@ public static function hexColor($check) * Requirements are uppercase, no whitespaces, max length 34, country code and checksum exist at right spots, * body matches against checksum via Mod97-10 algorithm * - * @param string $check The value to check - * + * @param mixed $check The value to check * @return bool Success */ public static function iban($check) { - if (!preg_match('/^[A-Z]{2}[0-9]{2}[A-Z0-9]{1,30}$/', $check)) { + if ( + !is_string($check) || + !preg_match('/^[A-Z]{2}[0-9]{2}[A-Z0-9]{1,30}$/', $check) + ) { return false; } @@ -1669,7 +1771,7 @@ public static function iban($check) $checksum %= 97; } - return ((98 - $checksum) === $checkInt); + return $checkInt === 98 - $checksum; } /** @@ -1683,7 +1785,8 @@ public static function iban($check) protected static function _getDateString($value) { $formatted = ''; - if (isset($value['year'], $value['month'], $value['day']) && + if ( + isset($value['year'], $value['month'], $value['day']) && (is_numeric($value['year']) && is_numeric($value['month']) && is_numeric($value['day'])) ) { $formatted .= sprintf('%d-%02d-%02d ', $value['year'], $value['month'], $value['day']); diff --git a/app/vendor/cakephp/cakephp/src/Validation/ValidationRule.php b/app/vendor/cakephp/cakephp/src/Validation/ValidationRule.php index e5dd4e5bf..91a86d2f7 100644 --- a/app/vendor/cakephp/cakephp/src/Validation/ValidationRule.php +++ b/app/vendor/cakephp/cakephp/src/Validation/ValidationRule.php @@ -26,7 +26,6 @@ */ class ValidationRule { - /** * The method to be called for a given scope * @@ -105,7 +104,7 @@ public function isLast() * new record * - data: The full data that was passed to the validation process * - field: The name of the field that is being processed - * @return bool|string + * @return bool|string|array * @throws \InvalidArgumentException when the supplied rule is not a valid * callable for the configured scope */ @@ -193,7 +192,7 @@ protected function _addValidatorProps($validator = []) $this->_pass = array_slice($value, 1); $value = array_shift($value); } - if (in_array($key, ['rule', 'on', 'message', 'last', 'provider', 'pass'])) { + if (in_array($key, ['rule', 'on', 'message', 'last', 'provider', 'pass'], true)) { $this->{"_$key"} = $value; } } diff --git a/app/vendor/cakephp/cakephp/src/Validation/ValidationSet.php b/app/vendor/cakephp/cakephp/src/Validation/ValidationSet.php index de4aa4446..bb6028951 100644 --- a/app/vendor/cakephp/cakephp/src/Validation/ValidationSet.php +++ b/app/vendor/cakephp/cakephp/src/Validation/ValidationSet.php @@ -25,7 +25,6 @@ */ class ValidationSet implements ArrayAccess, IteratorAggregate, Countable { - /** * Holds the ValidationRule objects * @@ -131,6 +130,8 @@ public function rule($name) if (!empty($this->_rules[$name])) { return $this->_rules[$name]; } + + return null; } /** diff --git a/app/vendor/cakephp/cakephp/src/Validation/Validator.php b/app/vendor/cakephp/cakephp/src/Validation/Validator.php index 49949719c..cb24fc037 100644 --- a/app/vendor/cakephp/cakephp/src/Validation/Validator.php +++ b/app/vendor/cakephp/cakephp/src/Validation/Validator.php @@ -19,6 +19,7 @@ use Countable; use InvalidArgumentException; use IteratorAggregate; +use Psr\Http\Message\UploadedFileInterface; /** * Validator object encapsulates all methods related to data validations for a model @@ -26,7 +27,7 @@ * * Implements ArrayAccess to easily modify rules in the set * - * @link https://book.cakephp.org/3.0/en/core-libraries/validation.html + * @link https://book.cakephp.org/3/en/core-libraries/validation.html */ class Validator implements ArrayAccess, IteratorAggregate, Countable { @@ -62,6 +63,9 @@ class Validator implements ArrayAccess, IteratorAggregate, Countable * and the value of `error` is equal to `UPLOAD_ERR_NO_FILE`, the value will be recognized as * empty. * + * When an instance of \Psr\Http\Message\UploadedFileInterface is given the + * return value of it's getError() method must be equal to `UPLOAD_ERR_NO_FILE`. + * * @var int */ const EMPTY_FILE = 4; @@ -147,7 +151,6 @@ class Validator implements ArrayAccess, IteratorAggregate, Countable /** * Constructor - * */ public function __construct() { @@ -156,14 +159,26 @@ public function __construct() } /** - * Returns an array of fields that have failed validation. On the current model. This method will - * actually run validation rules over data, not just return the messages. + * Validates and returns an array of failed fields and their error messages. * * @param array $data The data to be checked for errors * @param bool $newRecord whether the data to be validated is new or to be updated. - * @return array Array of invalid fields + * @return array Array of failed fields + * @deprecated 3.9.0 Renamed to validate() */ public function errors(array $data, $newRecord = true) + { + return $this->validate($data, $newRecord); + } + + /** + * Validates and returns an array of failed fields and their error messages. + * + * @param array $data The data to be checked for errors + * @param bool $newRecord whether the data to be validated is new or to be updated. + * @return array Array of failed fields + */ + public function validate(array $data, $newRecord = true) { $errors = []; @@ -324,7 +339,7 @@ public static function getDefaultProviders() * * @deprecated 3.4.0 Use setProvider()/getProvider() instead. * @param string $name The name under which the provider should be set. - * @param null|object|string $object Provider object or class name. + * @param string|object|null $object Provider object or class name. * @return $this|object|string|null */ public function provider($name, $object = null) @@ -496,7 +511,7 @@ public function addNested($field, Validator $validator, $message = null, $when = foreach ($this->providers() as $provider) { $validator->setProvider($provider, $this->getProvider($provider)); } - $errors = $validator->errors($value, $context['newRecord']); + $errors = $validator->validate($value, $context['newRecord']); $message = $message ? [static::NESTED => $message] : []; @@ -543,7 +558,7 @@ public function addNestedMany($field, Validator $validator, $message = null, $wh if (!is_array($row)) { return false; } - $check = $validator->errors($row, $context['newRecord']); + $check = $validator->validate($row, $context['newRecord']); if (!empty($check)) { $errors[$i] = $check; } @@ -605,7 +620,7 @@ public function requirePresence($field, $mode = true, $message = null) { $defaults = [ 'mode' => $mode, - 'message' => $message + 'message' => $message, ]; if (!is_array($field)) { @@ -809,7 +824,8 @@ public function allowEmptyFor($field, $flags, $when = true, $message = null) protected function sortMessageAndWhen($first, $second, $method) { // Called with `$message, $when`. No order change necessary - if (( + if ( + ( in_array($second, [true, false, 'create', 'update'], true) || is_callable($second) ) && ( @@ -1200,7 +1216,7 @@ public function notEmpty($field, $message = null, $when = false) { $defaults = [ 'when' => $when, - 'message' => $message + 'message' => $message, ]; if (!is_array($field)) { @@ -1282,6 +1298,63 @@ public function alphaNumeric($field, $message = null, $when = null) ]); } + /** + * Add a non-alphanumeric rule to a field. + * + * @param string $field The field you want to apply the rule to. + * @param string|null $message The error message when the rule fails. + * @param string|callable|null $when Either 'create' or 'update' or a callable that returns + * true when the validation rule should be applied. + * @see \Cake\Validation\Validation::notAlphaNumeric() + * @return $this + */ + public function notAlphaNumeric($field, $message = null, $when = null) + { + $extra = array_filter(['on' => $when, 'message' => $message]); + + return $this->add($field, 'notAlphaNumeric', $extra + [ + 'rule' => 'notAlphaNumeric', + ]); + } + + /** + * Add an ascii-alphanumeric rule to a field. + * + * @param string $field The field you want to apply the rule to. + * @param string|null $message The error message when the rule fails. + * @param string|callable|null $when Either 'create' or 'update' or a callable that returns + * true when the validation rule should be applied. + * @see \Cake\Validation\Validation::asciiAlphaNumeric() + * @return $this + */ + public function asciiAlphaNumeric($field, $message = null, $when = null) + { + $extra = array_filter(['on' => $when, 'message' => $message]); + + return $this->add($field, 'asciiAlphaNumeric', $extra + [ + 'rule' => 'asciiAlphaNumeric', + ]); + } + + /** + * Add a non-ascii alphanumeric rule to a field. + * + * @param string $field The field you want to apply the rule to. + * @param string|null $message The error message when the rule fails. + * @param string|callable|null $when Either 'create' or 'update' or a callable that returns + * true when the validation rule should be applied. + * @see \Cake\Validation\Validation::notAlphaNumeric() + * @return $this + */ + public function notAsciiAlphaNumeric($field, $message = null, $when = null) + { + $extra = array_filter(['on' => $when, 'message' => $message]); + + return $this->add($field, 'notAsciiAlphaNumeric', $extra + [ + 'rule' => 'notAsciiAlphaNumeric', + ]); + } + /** * Add an rule that ensures a string length is within a range. * @@ -1342,7 +1415,7 @@ public function greaterThan($field, $value, $message = null, $when = null) $extra = array_filter(['on' => $when, 'message' => $message]); return $this->add($field, 'greaterThan', $extra + [ - 'rule' => ['comparison', Validation::COMPARE_GREATER, $value] + 'rule' => ['comparison', Validation::COMPARE_GREATER, $value], ]); } @@ -1362,7 +1435,7 @@ public function greaterThanOrEqual($field, $value, $message = null, $when = null $extra = array_filter(['on' => $when, 'message' => $message]); return $this->add($field, 'greaterThanOrEqual', $extra + [ - 'rule' => ['comparison', Validation::COMPARE_GREATER_OR_EQUAL, $value] + 'rule' => ['comparison', Validation::COMPARE_GREATER_OR_EQUAL, $value], ]); } @@ -1382,7 +1455,7 @@ public function lessThan($field, $value, $message = null, $when = null) $extra = array_filter(['on' => $when, 'message' => $message]); return $this->add($field, 'lessThan', $extra + [ - 'rule' => ['comparison', Validation::COMPARE_LESS, $value] + 'rule' => ['comparison', Validation::COMPARE_LESS, $value], ]); } @@ -1402,7 +1475,7 @@ public function lessThanOrEqual($field, $value, $message = null, $when = null) $extra = array_filter(['on' => $when, 'message' => $message]); return $this->add($field, 'lessThanOrEqual', $extra + [ - 'rule' => ['comparison', Validation::COMPARE_LESS_OR_EQUAL, $value] + 'rule' => ['comparison', Validation::COMPARE_LESS_OR_EQUAL, $value], ]); } @@ -1422,7 +1495,7 @@ public function equals($field, $value, $message = null, $when = null) $extra = array_filter(['on' => $when, 'message' => $message]); return $this->add($field, 'equals', $extra + [ - 'rule' => ['comparison', Validation::COMPARE_EQUAL, $value] + 'rule' => ['comparison', Validation::COMPARE_EQUAL, $value], ]); } @@ -1442,7 +1515,7 @@ public function notEquals($field, $value, $message = null, $when = null) $extra = array_filter(['on' => $when, 'message' => $message]); return $this->add($field, 'notEquals', $extra + [ - 'rule' => ['comparison', Validation::COMPARE_NOT_EQUAL, $value] + 'rule' => ['comparison', Validation::COMPARE_NOT_EQUAL, $value], ]); } @@ -1464,7 +1537,7 @@ public function sameAs($field, $secondField, $message = null, $when = null) $extra = array_filter(['on' => $when, 'message' => $message]); return $this->add($field, 'sameAs', $extra + [ - 'rule' => ['compareFields', $secondField, Validation::COMPARE_SAME] + 'rule' => ['compareFields', $secondField, Validation::COMPARE_SAME], ]); } @@ -1485,7 +1558,7 @@ public function notSameAs($field, $secondField, $message = null, $when = null) $extra = array_filter(['on' => $when, 'message' => $message]); return $this->add($field, 'notSameAs', $extra + [ - 'rule' => ['compareFields', $secondField, Validation::COMPARE_NOT_SAME] + 'rule' => ['compareFields', $secondField, Validation::COMPARE_NOT_SAME], ]); } @@ -1506,7 +1579,7 @@ public function equalToField($field, $secondField, $message = null, $when = null $extra = array_filter(['on' => $when, 'message' => $message]); return $this->add($field, 'equalToField', $extra + [ - 'rule' => ['compareFields', $secondField, Validation::COMPARE_EQUAL] + 'rule' => ['compareFields', $secondField, Validation::COMPARE_EQUAL], ]); } @@ -1527,7 +1600,7 @@ public function notEqualToField($field, $secondField, $message = null, $when = n $extra = array_filter(['on' => $when, 'message' => $message]); return $this->add($field, 'notEqualToField', $extra + [ - 'rule' => ['compareFields', $secondField, Validation::COMPARE_NOT_EQUAL] + 'rule' => ['compareFields', $secondField, Validation::COMPARE_NOT_EQUAL], ]); } @@ -1548,7 +1621,7 @@ public function greaterThanField($field, $secondField, $message = null, $when = $extra = array_filter(['on' => $when, 'message' => $message]); return $this->add($field, 'greaterThanField', $extra + [ - 'rule' => ['compareFields', $secondField, Validation::COMPARE_GREATER] + 'rule' => ['compareFields', $secondField, Validation::COMPARE_GREATER], ]); } @@ -1569,7 +1642,7 @@ public function greaterThanOrEqualToField($field, $secondField, $message = null, $extra = array_filter(['on' => $when, 'message' => $message]); return $this->add($field, 'greaterThanOrEqualToField', $extra + [ - 'rule' => ['compareFields', $secondField, Validation::COMPARE_GREATER_OR_EQUAL] + 'rule' => ['compareFields', $secondField, Validation::COMPARE_GREATER_OR_EQUAL], ]); } @@ -1590,7 +1663,7 @@ public function lessThanField($field, $secondField, $message = null, $when = nul $extra = array_filter(['on' => $when, 'message' => $message]); return $this->add($field, 'lessThanField', $extra + [ - 'rule' => ['compareFields', $secondField, Validation::COMPARE_LESS] + 'rule' => ['compareFields', $secondField, Validation::COMPARE_LESS], ]); } @@ -1611,7 +1684,7 @@ public function lessThanOrEqualToField($field, $secondField, $message = null, $w $extra = array_filter(['on' => $when, 'message' => $message]); return $this->add($field, 'lessThanOrEqualToField', $extra + [ - 'rule' => ['compareFields', $secondField, Validation::COMPARE_LESS_OR_EQUAL] + 'rule' => ['compareFields', $secondField, Validation::COMPARE_LESS_OR_EQUAL], ]); } @@ -1625,13 +1698,14 @@ public function lessThanOrEqualToField($field, $secondField, $message = null, $w * true when the validation rule should be applied. * @see \Cake\Validation\Validation::containsNonAlphaNumeric() * @return $this + * @deprecated 3.9.0 Use notAlphaNumeric() instead. Will be removed in 5.0 */ public function containsNonAlphaNumeric($field, $limit = 1, $message = null, $when = null) { $extra = array_filter(['on' => $when, 'message' => $message]); return $this->add($field, 'containsNonAlphaNumeric', $extra + [ - 'rule' => ['containsNonAlphaNumeric', $limit] + 'rule' => ['containsNonAlphaNumeric', $limit], ]); } @@ -1651,7 +1725,7 @@ public function date($field, $formats = ['ymd'], $message = null, $when = null) $extra = array_filter(['on' => $when, 'message' => $message]); return $this->add($field, 'date', $extra + [ - 'rule' => ['date', $formats] + 'rule' => ['date', $formats], ]); } @@ -1671,7 +1745,7 @@ public function dateTime($field, $formats = ['ymd'], $message = null, $when = nu $extra = array_filter(['on' => $when, 'message' => $message]); return $this->add($field, 'dateTime', $extra + [ - 'rule' => ['datetime', $formats] + 'rule' => ['datetime', $formats], ]); } @@ -1690,7 +1764,7 @@ public function time($field, $message = null, $when = null) $extra = array_filter(['on' => $when, 'message' => $message]); return $this->add($field, 'time', $extra + [ - 'rule' => 'time' + 'rule' => 'time', ]); } @@ -1710,7 +1784,7 @@ public function localizedTime($field, $type = 'datetime', $message = null, $when $extra = array_filter(['on' => $when, 'message' => $message]); return $this->add($field, 'localizedTime', $extra + [ - 'rule' => ['localizedTime', $type] + 'rule' => ['localizedTime', $type], ]); } @@ -1729,7 +1803,7 @@ public function boolean($field, $message = null, $when = null) $extra = array_filter(['on' => $when, 'message' => $message]); return $this->add($field, 'boolean', $extra + [ - 'rule' => 'boolean' + 'rule' => 'boolean', ]); } @@ -1749,7 +1823,7 @@ public function decimal($field, $places = null, $message = null, $when = null) $extra = array_filter(['on' => $when, 'message' => $message]); return $this->add($field, 'decimal', $extra + [ - 'rule' => ['decimal', $places] + 'rule' => ['decimal', $places], ]); } @@ -1769,7 +1843,7 @@ public function email($field, $checkMX = false, $message = null, $when = null) $extra = array_filter(['on' => $when, 'message' => $message]); return $this->add($field, 'email', $extra + [ - 'rule' => ['email', $checkMX] + 'rule' => ['email', $checkMX], ]); } @@ -1790,7 +1864,7 @@ public function ip($field, $message = null, $when = null) $extra = array_filter(['on' => $when, 'message' => $message]); return $this->add($field, 'ip', $extra + [ - 'rule' => 'ip' + 'rule' => 'ip', ]); } @@ -1809,7 +1883,7 @@ public function ipv4($field, $message = null, $when = null) $extra = array_filter(['on' => $when, 'message' => $message]); return $this->add($field, 'ipv4', $extra + [ - 'rule' => ['ip', 'ipv4'] + 'rule' => ['ip', 'ipv4'], ]); } @@ -1828,7 +1902,7 @@ public function ipv6($field, $message = null, $when = null) $extra = array_filter(['on' => $when, 'message' => $message]); return $this->add($field, 'ipv6', $extra + [ - 'rule' => ['ip', 'ipv6'] + 'rule' => ['ip', 'ipv6'], ]); } @@ -1848,7 +1922,7 @@ public function minLength($field, $min, $message = null, $when = null) $extra = array_filter(['on' => $when, 'message' => $message]); return $this->add($field, 'minLength', $extra + [ - 'rule' => ['minLength', $min] + 'rule' => ['minLength', $min], ]); } @@ -1868,7 +1942,7 @@ public function minLengthBytes($field, $min, $message = null, $when = null) $extra = array_filter(['on' => $when, 'message' => $message]); return $this->add($field, 'minLengthBytes', $extra + [ - 'rule' => ['minLengthBytes', $min] + 'rule' => ['minLengthBytes', $min], ]); } @@ -1888,7 +1962,7 @@ public function maxLength($field, $max, $message = null, $when = null) $extra = array_filter(['on' => $when, 'message' => $message]); return $this->add($field, 'maxLength', $extra + [ - 'rule' => ['maxLength', $max] + 'rule' => ['maxLength', $max], ]); } @@ -1908,7 +1982,7 @@ public function maxLengthBytes($field, $max, $message = null, $when = null) $extra = array_filter(['on' => $when, 'message' => $message]); return $this->add($field, 'maxLengthBytes', $extra + [ - 'rule' => ['maxLengthBytes', $max] + 'rule' => ['maxLengthBytes', $max], ]); } @@ -1927,7 +2001,7 @@ public function numeric($field, $message = null, $when = null) $extra = array_filter(['on' => $when, 'message' => $message]); return $this->add($field, 'numeric', $extra + [ - 'rule' => 'numeric' + 'rule' => 'numeric', ]); } @@ -1946,7 +2020,7 @@ public function naturalNumber($field, $message = null, $when = null) $extra = array_filter(['on' => $when, 'message' => $message]); return $this->add($field, 'naturalNumber', $extra + [ - 'rule' => ['naturalNumber', false] + 'rule' => ['naturalNumber', false], ]); } @@ -1965,7 +2039,7 @@ public function nonNegativeInteger($field, $message = null, $when = null) $extra = array_filter(['on' => $when, 'message' => $message]); return $this->add($field, 'nonNegativeInteger', $extra + [ - 'rule' => ['naturalNumber', true] + 'rule' => ['naturalNumber', true], ]); } @@ -1988,7 +2062,7 @@ public function range($field, array $range, $message = null, $when = null) $extra = array_filter(['on' => $when, 'message' => $message]); return $this->add($field, 'range', $extra + [ - 'rule' => ['range', array_shift($range), array_shift($range)] + 'rule' => ['range', array_shift($range), array_shift($range)], ]); } @@ -2009,7 +2083,7 @@ public function url($field, $message = null, $when = null) $extra = array_filter(['on' => $when, 'message' => $message]); return $this->add($field, 'url', $extra + [ - 'rule' => ['url', false] + 'rule' => ['url', false], ]); } @@ -2030,7 +2104,7 @@ public function urlWithProtocol($field, $message = null, $when = null) $extra = array_filter(['on' => $when, 'message' => $message]); return $this->add($field, 'urlWithProtocol', $extra + [ - 'rule' => ['url', true] + 'rule' => ['url', true], ]); } @@ -2050,7 +2124,7 @@ public function inList($field, array $list, $message = null, $when = null) $extra = array_filter(['on' => $when, 'message' => $message]); return $this->add($field, 'inList', $extra + [ - 'rule' => ['inList', $list] + 'rule' => ['inList', $list], ]); } @@ -2069,7 +2143,7 @@ public function uuid($field, $message = null, $when = null) $extra = array_filter(['on' => $when, 'message' => $message]); return $this->add($field, 'uuid', $extra + [ - 'rule' => 'uuid' + 'rule' => 'uuid', ]); } @@ -2091,7 +2165,7 @@ public function uploadedFile($field, array $options, $message = null, $when = nu $extra = array_filter(['on' => $when, 'message' => $message]); return $this->add($field, 'uploadedFile', $extra + [ - 'rule' => ['uploadedFile', $options] + 'rule' => ['uploadedFile', $options], ]); } @@ -2112,7 +2186,7 @@ public function latLong($field, $message = null, $when = null) $extra = array_filter(['on' => $when, 'message' => $message]); return $this->add($field, 'latLong', $extra + [ - 'rule' => 'geoCoordinate' + 'rule' => 'geoCoordinate', ]); } @@ -2131,7 +2205,7 @@ public function latitude($field, $message = null, $when = null) $extra = array_filter(['on' => $when, 'message' => $message]); return $this->add($field, 'latitude', $extra + [ - 'rule' => 'latitude' + 'rule' => 'latitude', ]); } @@ -2150,7 +2224,7 @@ public function longitude($field, $message = null, $when = null) $extra = array_filter(['on' => $when, 'message' => $message]); return $this->add($field, 'longitude', $extra + [ - 'rule' => 'longitude' + 'rule' => 'longitude', ]); } @@ -2169,7 +2243,7 @@ public function ascii($field, $message = null, $when = null) $extra = array_filter(['on' => $when, 'message' => $message]); return $this->add($field, 'ascii', $extra + [ - 'rule' => 'ascii' + 'rule' => 'ascii', ]); } @@ -2188,7 +2262,7 @@ public function utf8($field, $message = null, $when = null) $extra = array_filter(['on' => $when, 'message' => $message]); return $this->add($field, 'utf8', $extra + [ - 'rule' => ['utf8', ['extended' => false]] + 'rule' => ['utf8', ['extended' => false]], ]); } @@ -2209,7 +2283,7 @@ public function utf8Extended($field, $message = null, $when = null) $extra = array_filter(['on' => $when, 'message' => $message]); return $this->add($field, 'utf8Extended', $extra + [ - 'rule' => ['utf8', ['extended' => true]] + 'rule' => ['utf8', ['extended' => true]], ]); } @@ -2228,7 +2302,7 @@ public function integer($field, $message = null, $when = null) $extra = array_filter(['on' => $when, 'message' => $message]); return $this->add($field, 'integer', $extra + [ - 'rule' => 'isInteger' + 'rule' => 'isInteger', ]); } @@ -2247,7 +2321,7 @@ public function isArray($field, $message = null, $when = null) $extra = array_filter(['on' => $when, 'message' => $message]); return $this->add($field, 'isArray', $extra + [ - 'rule' => 'isArray' + 'rule' => 'isArray', ]); } @@ -2266,7 +2340,7 @@ public function scalar($field, $message = null, $when = null) $extra = array_filter(['on' => $when, 'message' => $message]); return $this->add($field, 'scalar', $extra + [ - 'rule' => 'isScalar' + 'rule' => 'isScalar', ]); } @@ -2308,7 +2382,7 @@ public function multipleOptions($field, array $options = [], $message = null, $w unset($options['caseInsensitive']); return $this->add($field, 'multipleOptions', $extra + [ - 'rule' => ['multiple', $options, $caseInsensitive] + 'rule' => ['multiple', $options, $caseInsensitive], ]); } @@ -2335,7 +2409,7 @@ public function hasAtLeast($field, $count, $message = null, $when = null) } return Validation::numElements($value, Validation::COMPARE_GREATER_OR_EQUAL, $count); - } + }, ]); } @@ -2362,7 +2436,7 @@ public function hasAtMost($field, $count, $message = null, $when = null) } return Validation::numElements($value, Validation::COMPARE_LESS_OR_EQUAL, $count); - } + }, ]); } @@ -2415,7 +2489,7 @@ public function regex($field, $regex, $message = null, $when = null) $extra = array_filter(['on' => $when, 'message' => $message]); return $this->add($field, 'regex', $extra + [ - 'rule' => ['custom', $regex] + 'rule' => ['custom', $regex], ]); } @@ -2558,7 +2632,8 @@ protected function isEmpty($data, $flags) } if (is_array($data)) { - if (($flags & self::EMPTY_FILE) + if ( + ($flags & self::EMPTY_FILE) && isset($data['name'], $data['type'], $data['tmp_name'], $data['error']) && (int)$data['error'] === UPLOAD_ERR_NO_FILE ) { @@ -2584,6 +2659,14 @@ protected function isEmpty($data, $flags) } } + if ( + ($flags & self::EMPTY_FILE) + && $data instanceof UploadedFileInterface + && $data->getError() === UPLOAD_ERR_NO_FILE + ) { + return true; + } + return false; } @@ -2652,7 +2735,7 @@ public function __debugInfo() '_allowEmptyFlags' => $this->_allowEmptyFlags, '_useI18n' => $this->_useI18n, '_providers' => array_keys($this->_providers), - '_fields' => $fields + '_fields' => $fields, ]; } } diff --git a/app/vendor/cakephp/cakephp/src/Validation/ValidatorAwareInterface.php b/app/vendor/cakephp/cakephp/src/Validation/ValidatorAwareInterface.php index e7f67b2a0..ac3fd1315 100644 --- a/app/vendor/cakephp/cakephp/src/Validation/ValidatorAwareInterface.php +++ b/app/vendor/cakephp/cakephp/src/Validation/ValidatorAwareInterface.php @@ -19,7 +19,6 @@ */ interface ValidatorAwareInterface { - /** * Name of default validation set. * diff --git a/app/vendor/cakephp/cakephp/src/Validation/ValidatorAwareTrait.php b/app/vendor/cakephp/cakephp/src/Validation/ValidatorAwareTrait.php index 0b11f1ba5..ab5bc7e52 100644 --- a/app/vendor/cakephp/cakephp/src/Validation/ValidatorAwareTrait.php +++ b/app/vendor/cakephp/cakephp/src/Validation/ValidatorAwareTrait.php @@ -38,7 +38,6 @@ */ trait ValidatorAwareTrait { - /** * Validator class. * @@ -174,7 +173,7 @@ protected function createValidator($name) throw new RuntimeException($message); } - $validator = new $this->_validatorClass; + $validator = new $this->_validatorClass(); $validator = $this->$method($validator); if ($this instanceof EventDispatcherInterface) { $event = defined(self::class . '::BUILD_VALIDATOR_EVENT') ? self::BUILD_VALIDATOR_EVENT : 'Model.buildValidator'; @@ -208,7 +207,7 @@ protected function createValidator($name) */ public function setValidator($name, Validator $validator) { - $validator->setProvider(self::VALIDATOR_PROVIDER_NAME, $this); + $validator->setProvider(static::VALIDATOR_PROVIDER_NAME, $this); $this->_validators[$name] = $validator; return $this; diff --git a/app/vendor/cakephp/cakephp/src/Validation/composer.json b/app/vendor/cakephp/cakephp/src/Validation/composer.json index e4de56aa7..db585a33d 100644 --- a/app/vendor/cakephp/cakephp/src/Validation/composer.json +++ b/app/vendor/cakephp/cakephp/src/Validation/composer.json @@ -22,7 +22,7 @@ "source": "https://github.com/cakephp/validation" }, "require": { - "php": ">=5.6.0", + "php": ">=5.6.0,<8.0.0", "cakephp/core": "^3.6.0", "cakephp/utility": "^3.6.0", "psr/http-message": "^1.0.0" diff --git a/app/vendor/cakephp/cakephp/src/View/AjaxView.php b/app/vendor/cakephp/cakephp/src/View/AjaxView.php index 6538fc1f2..6648b0d07 100644 --- a/app/vendor/cakephp/cakephp/src/View/AjaxView.php +++ b/app/vendor/cakephp/cakephp/src/View/AjaxView.php @@ -25,7 +25,6 @@ */ class AjaxView extends View { - /** * {@inheritDoc} */ diff --git a/app/vendor/cakephp/cakephp/src/View/Cell.php b/app/vendor/cakephp/cakephp/src/View/Cell.php index d273dd4a1..cd3139aaa 100644 --- a/app/vendor/cakephp/cakephp/src/View/Cell.php +++ b/app/vendor/cakephp/cakephp/src/View/Cell.php @@ -35,7 +35,6 @@ */ abstract class Cell { - use EventDispatcherTrait; use LocatorAwareTrait; use ModelAwareTrait; @@ -87,7 +86,7 @@ abstract class Cell * @deprecated 3.7.0 Use ViewBuilder::setOptions() or any one of it's setter methods instead. */ protected $_validViewOptions = [ - 'viewPath' + 'viewPath', ]; /** @@ -231,7 +230,7 @@ protected function _cacheConfig($action, $template = null) $key = str_replace('\\', '_', $key); $default = [ 'config' => 'default', - 'key' => $key + 'key' => $key, ]; if ($this->_cache === true) { return $default; diff --git a/app/vendor/cakephp/cakephp/src/View/CellTrait.php b/app/vendor/cakephp/cakephp/src/View/CellTrait.php index 324ce8817..ebe26595f 100644 --- a/app/vendor/cakephp/cakephp/src/View/CellTrait.php +++ b/app/vendor/cakephp/cakephp/src/View/CellTrait.php @@ -23,7 +23,6 @@ */ trait CellTrait { - /** * Renders the given cell. * @@ -92,7 +91,7 @@ protected function cell($cell, array $data = [], array $options = []) */ protected function _createCell($className, $action, $plugin, $options) { - /* @var \Cake\View\Cell $instance */ + /** @var \Cake\View\Cell $instance */ $instance = new $className($this->request, $this->response, $this->getEventManager(), $options); $builder = $instance->viewBuilder(); diff --git a/app/vendor/cakephp/cakephp/src/View/Exception/MissingCellException.php b/app/vendor/cakephp/cakephp/src/View/Exception/MissingCellException.php index 1c2a4a293..938ac4da7 100644 --- a/app/vendor/cakephp/cakephp/src/View/Exception/MissingCellException.php +++ b/app/vendor/cakephp/cakephp/src/View/Exception/MissingCellException.php @@ -21,6 +21,8 @@ */ class MissingCellException extends Exception { - + /** + * @inheritDoc + */ protected $_messageTemplate = 'Cell class %s is missing.'; } diff --git a/app/vendor/cakephp/cakephp/src/View/Exception/MissingCellViewException.php b/app/vendor/cakephp/cakephp/src/View/Exception/MissingCellViewException.php index 330e1ea90..bad1e1b27 100644 --- a/app/vendor/cakephp/cakephp/src/View/Exception/MissingCellViewException.php +++ b/app/vendor/cakephp/cakephp/src/View/Exception/MissingCellViewException.php @@ -19,6 +19,8 @@ */ class MissingCellViewException extends Exception { - + /** + * @inheritDoc + */ protected $_messageTemplate = 'Cell view file "%s" is missing.'; } diff --git a/app/vendor/cakephp/cakephp/src/View/Exception/MissingElementException.php b/app/vendor/cakephp/cakephp/src/View/Exception/MissingElementException.php index 0585285fa..4fa9bb282 100644 --- a/app/vendor/cakephp/cakephp/src/View/Exception/MissingElementException.php +++ b/app/vendor/cakephp/cakephp/src/View/Exception/MissingElementException.php @@ -19,11 +19,8 @@ */ class MissingElementException extends Exception { - /** - * Message template - * - * @var string + * @inheritDoc */ protected $_messageTemplate = 'Element file "%s" is missing.'; } diff --git a/app/vendor/cakephp/cakephp/src/View/Exception/MissingHelperException.php b/app/vendor/cakephp/cakephp/src/View/Exception/MissingHelperException.php index d370aaf79..3c48a62d4 100644 --- a/app/vendor/cakephp/cakephp/src/View/Exception/MissingHelperException.php +++ b/app/vendor/cakephp/cakephp/src/View/Exception/MissingHelperException.php @@ -19,6 +19,8 @@ */ class MissingHelperException extends Exception { - + /** + * @inheritDoc + */ protected $_messageTemplate = 'Helper class %s could not be found.'; } diff --git a/app/vendor/cakephp/cakephp/src/View/Exception/MissingLayoutException.php b/app/vendor/cakephp/cakephp/src/View/Exception/MissingLayoutException.php index 9af79e530..a50c703df 100644 --- a/app/vendor/cakephp/cakephp/src/View/Exception/MissingLayoutException.php +++ b/app/vendor/cakephp/cakephp/src/View/Exception/MissingLayoutException.php @@ -19,6 +19,8 @@ */ class MissingLayoutException extends Exception { - + /** + * @inheritDoc + */ protected $_messageTemplate = 'Layout file "%s" is missing.'; } diff --git a/app/vendor/cakephp/cakephp/src/View/Exception/MissingTemplateException.php b/app/vendor/cakephp/cakephp/src/View/Exception/MissingTemplateException.php index 83f882ee0..76c7e2e45 100644 --- a/app/vendor/cakephp/cakephp/src/View/Exception/MissingTemplateException.php +++ b/app/vendor/cakephp/cakephp/src/View/Exception/MissingTemplateException.php @@ -19,6 +19,8 @@ */ class MissingTemplateException extends Exception { - + /** + * @inheritDoc + */ protected $_messageTemplate = 'Template file "%s" is missing.'; } diff --git a/app/vendor/cakephp/cakephp/src/View/Exception/MissingViewException.php b/app/vendor/cakephp/cakephp/src/View/Exception/MissingViewException.php index 5fe5e073b..d01027d6b 100644 --- a/app/vendor/cakephp/cakephp/src/View/Exception/MissingViewException.php +++ b/app/vendor/cakephp/cakephp/src/View/Exception/MissingViewException.php @@ -21,6 +21,8 @@ */ class MissingViewException extends Exception { - + /** + * @inheritDoc + */ protected $_messageTemplate = 'View class "%s" is missing.'; } diff --git a/app/vendor/cakephp/cakephp/src/View/Form/ArrayContext.php b/app/vendor/cakephp/cakephp/src/View/Form/ArrayContext.php index c307cb71f..e009d8325 100644 --- a/app/vendor/cakephp/cakephp/src/View/Form/ArrayContext.php +++ b/app/vendor/cakephp/cakephp/src/View/Form/ArrayContext.php @@ -66,7 +66,6 @@ */ class ArrayContext implements ContextInterface { - /** * The request object. * @@ -106,7 +105,8 @@ public function __construct(ServerRequest $request, array $context) */ public function primaryKey() { - if (empty($this->_context['schema']['_constraints']) || + if ( + empty($this->_context['schema']['_constraints']) || !is_array($this->_context['schema']['_constraints']) ) { return []; @@ -127,7 +127,7 @@ public function isPrimaryKey($field) { $primaryKey = $this->primaryKey(); - return in_array($field, $primaryKey); + return in_array($field, $primaryKey, true); } /** @@ -170,7 +170,7 @@ public function val($field, $options = []) { $options += [ 'default' => null, - 'schemaDefault' => true + 'schemaDefault' => true, ]; $val = $this->_request->getData($field); @@ -261,7 +261,7 @@ public function fieldNames() * Get the abstract field type for a given field name. * * @param string $field A dot separated path to get a schema type for. - * @return null|string An abstract data type or null. + * @return string|null An abstract data type or null. * @see \Cake\Database\Type */ public function type($field) diff --git a/app/vendor/cakephp/cakephp/src/View/Form/ContextFactory.php b/app/vendor/cakephp/cakephp/src/View/Form/ContextFactory.php index a3b68db7d..bfe31524d 100644 --- a/app/vendor/cakephp/cakephp/src/View/Form/ContextFactory.php +++ b/app/vendor/cakephp/cakephp/src/View/Form/ContextFactory.php @@ -71,7 +71,7 @@ public static function createWithDefaults(array $providers = []) if (is_array($data['entity']) && empty($data['entity']['schema'])) { return new EntityContext($request, $data); } - } + }, ], [ 'type' => 'array', @@ -79,7 +79,7 @@ public static function createWithDefaults(array $providers = []) if (is_array($data['entity']) && isset($data['entity']['schema'])) { return new ArrayContext($request, $data['entity']); } - } + }, ], [ 'type' => 'form', @@ -87,7 +87,7 @@ public static function createWithDefaults(array $providers = []) if ($data['entity'] instanceof Form) { return new FormContext($request, $data); } - } + }, ], ] + $providers; diff --git a/app/vendor/cakephp/cakephp/src/View/Form/ContextInterface.php b/app/vendor/cakephp/cakephp/src/View/Form/ContextInterface.php index a87e3ea1e..039a4ef92 100644 --- a/app/vendor/cakephp/cakephp/src/View/Form/ContextInterface.php +++ b/app/vendor/cakephp/cakephp/src/View/Form/ContextInterface.php @@ -22,7 +22,6 @@ */ interface ContextInterface { - /** * Get the fields used in the context as a primary key. * @@ -84,7 +83,7 @@ public function fieldNames(); * Get the abstract field type for a given field name. * * @param string $field A dot separated path to get a schema type for. - * @return null|string An abstract data type or null. + * @return string|null An abstract data type or null. * @see \Cake\Database\Type */ public function type($field); diff --git a/app/vendor/cakephp/cakephp/src/View/Form/EntityContext.php b/app/vendor/cakephp/cakephp/src/View/Form/EntityContext.php index 52812391e..ad52be87d 100644 --- a/app/vendor/cakephp/cakephp/src/View/Form/EntityContext.php +++ b/app/vendor/cakephp/cakephp/src/View/Form/EntityContext.php @@ -184,7 +184,7 @@ public function isPrimaryKey($field) $table = $this->_getTable($parts); $primaryKey = (array)$table->getPrimaryKey(); - return in_array(array_pop($parts), $primaryKey); + return in_array(array_pop($parts), $primaryKey, true); } /** @@ -231,7 +231,7 @@ public function val($field, $options = []) { $options += [ 'default' => null, - 'schemaDefault' => true + 'schemaDefault' => true, ]; $val = $this->_request->getData($field); @@ -254,7 +254,8 @@ public function val($field, $options = []) if ($val !== null) { return $val; } - if ($options['default'] !== null + if ( + $options['default'] !== null || !$options['schemaDefault'] || !$entity->isNew() ) { @@ -322,7 +323,7 @@ protected function _extractMultiple($values, $path) * * @param array|null $path Each one of the parts in a path for a field name * or null to get the entity passed in constructor context. - * @return \Cake\Datasource\EntityInterface|\Traversable|array|bool + * @return \Cake\Datasource\EntityInterface|\Traversable|array|false * @throws \RuntimeException When properties cannot be read. */ public function entity($path = null) @@ -602,7 +603,7 @@ protected function _getValidator($parts) * @param array $parts Each one of the parts in a path for a field name * @param bool $fallback Whether or not to fallback to the last found table * when a non-existent field/property is being encountered. - * @return \Cake\ORM\Table|bool Table instance or false + * @return \Cake\ORM\Table|false Table instance or false */ protected function _getTable($parts, $fallback = true) { @@ -653,7 +654,7 @@ protected function _getTable($parts, $fallback = true) * Get the abstract field type for a given field name. * * @param string $field A dot separated path to get a schema type for. - * @return null|string An abstract data type or null. + * @return string|null An abstract data type or null. * @see \Cake\Database\Type */ public function type($field) diff --git a/app/vendor/cakephp/cakephp/src/View/Form/FormContext.php b/app/vendor/cakephp/cakephp/src/View/Form/FormContext.php index 494be6b27..169178687 100644 --- a/app/vendor/cakephp/cakephp/src/View/Form/FormContext.php +++ b/app/vendor/cakephp/cakephp/src/View/Form/FormContext.php @@ -25,7 +25,6 @@ */ class FormContext implements ContextInterface { - /** * The request object. * @@ -80,13 +79,19 @@ public function isCreate() } /** - * {@inheritDoc} + * Get the value for a given path. + * + * Traverses the request and form data and finds the value for $path. + * + * @param string $field The dot separated path to the value. + * @param array $options options + * @return mixed The value of the field or null on a miss. */ public function val($field, $options = []) { $options += [ 'default' => null, - 'schemaDefault' => true + 'schemaDefault' => true, ]; $val = $this->_request->getData($field); diff --git a/app/vendor/cakephp/cakephp/src/View/Form/NullContext.php b/app/vendor/cakephp/cakephp/src/View/Form/NullContext.php index c05c63ee4..45f0da620 100644 --- a/app/vendor/cakephp/cakephp/src/View/Form/NullContext.php +++ b/app/vendor/cakephp/cakephp/src/View/Form/NullContext.php @@ -24,7 +24,6 @@ */ class NullContext implements ContextInterface { - /** * The request object. * diff --git a/app/vendor/cakephp/cakephp/src/View/Helper.php b/app/vendor/cakephp/cakephp/src/View/Helper.php index 765d0d6c8..abc5cac09 100644 --- a/app/vendor/cakephp/cakephp/src/View/Helper.php +++ b/app/vendor/cakephp/cakephp/src/View/Helper.php @@ -40,7 +40,6 @@ */ class Helper implements EventListenerInterface { - use InstanceConfigTrait; /** @@ -110,7 +109,7 @@ public function __construct(View $View, array $config = []) * * @param string $method Method to invoke * @param array $params Array of params for the method. - * @return void + * @return mixed|void */ public function __call($method, $params) { @@ -257,7 +256,7 @@ protected function _cleanConfirmMessage($message) * * @param array $options Array options/attributes to add a class to * @param string|null $class The class name being added. - * @param string $key the key to use for class. + * @param string $key the key to use for class. Defaults to `'class'`. * @return array Array of options with $key set. */ public function addClass(array $options = [], $class = null, $key = 'class') @@ -292,7 +291,7 @@ public function implementedEvents() 'View.beforeRender' => 'beforeRender', 'View.afterRender' => 'afterRender', 'View.beforeLayout' => 'beforeLayout', - 'View.afterLayout' => 'afterLayout' + 'View.afterLayout' => 'afterLayout', ]; $events = []; foreach ($eventMap as $event => $method) { diff --git a/app/vendor/cakephp/cakephp/src/View/Helper/BreadcrumbsHelper.php b/app/vendor/cakephp/cakephp/src/View/Helper/BreadcrumbsHelper.php index 06effa520..14de4dee5 100644 --- a/app/vendor/cakephp/cakephp/src/View/Helper/BreadcrumbsHelper.php +++ b/app/vendor/cakephp/cakephp/src/View/Helper/BreadcrumbsHelper.php @@ -25,7 +25,6 @@ */ class BreadcrumbsHelper extends Helper { - use StringTemplateTrait; /** @@ -45,8 +44,8 @@ class BreadcrumbsHelper extends Helper 'wrapper' => '{{content}}', 'item' => '{{title}}{{separator}}', 'itemWithoutLink' => '{{title}}{{separator}}', - 'separator' => '{{separator}}' - ] + 'separator' => '{{separator}}', + ], ]; /** @@ -92,7 +91,7 @@ public function add($title, $url = null, array $options = []) /** * Prepend a crumb to the start of the queue. * - * @param string $title If provided as a string, it represents the title of the crumb. + * @param string|array $title If provided as a string, it represents the title of the crumb. * Alternatively, if you want to add multiple crumbs at once, you can provide an array, with each values being a * single crumb. Arrays are expected to be of this form: * - *title* The title of the crumb @@ -292,7 +291,7 @@ public function render(array $attributes = [], array $separator = []) 'title' => $title, 'url' => $url, 'separator' => '', - 'templateVars' => isset($options['templateVars']) ? $options['templateVars'] : [] + 'templateVars' => isset($options['templateVars']) ? $options['templateVars'] : [], ]; if (!$url) { @@ -309,7 +308,7 @@ public function render(array $attributes = [], array $separator = []) $crumbTrail = $this->formatTemplate('wrapper', [ 'content' => $crumbTrail, 'attrs' => $templater->formatAttributes($attributes, ['templateVars']), - 'templateVars' => isset($attributes['templateVars']) ? $attributes['templateVars'] : [] + 'templateVars' => isset($attributes['templateVars']) ? $attributes['templateVars'] : [], ]); return $crumbTrail; diff --git a/app/vendor/cakephp/cakephp/src/View/Helper/FlashHelper.php b/app/vendor/cakephp/cakephp/src/View/Helper/FlashHelper.php index f47aea38f..91f81b9c8 100644 --- a/app/vendor/cakephp/cakephp/src/View/Helper/FlashHelper.php +++ b/app/vendor/cakephp/cakephp/src/View/Helper/FlashHelper.php @@ -25,7 +25,6 @@ */ class FlashHelper extends Helper { - /** * Used to render the message set in FlashComponent::set() * diff --git a/app/vendor/cakephp/cakephp/src/View/Helper/FormHelper.php b/app/vendor/cakephp/cakephp/src/View/Helper/FormHelper.php index ffdb236bc..f4b43ff10 100644 --- a/app/vendor/cakephp/cakephp/src/View/Helper/FormHelper.php +++ b/app/vendor/cakephp/cakephp/src/View/Helper/FormHelper.php @@ -35,18 +35,17 @@ * * Automatic generation of HTML FORMs from given data. * - * @method string text($fieldName, array $options = []) - * @method string number($fieldName, array $options = []) - * @method string email($fieldName, array $options = []) - * @method string password($fieldName, array $options = []) - * @method string search($fieldName, array $options = []) + * @method string text(string $fieldName, array $options = []) + * @method string number(string $fieldName, array $options = []) + * @method string email(string $fieldName, array $options = []) + * @method string password(string $fieldName, array $options = []) + * @method string search(string $fieldName, array $options = []) * @property \Cake\View\Helper\HtmlHelper $Html * @property \Cake\View\Helper\UrlHelper $Url - * @link https://book.cakephp.org/3.0/en/views/helpers/form.html + * @link https://book.cakephp.org/3/en/views/helpers/form.html */ class FormHelper extends Helper { - use IdGeneratorTrait; use SecureFieldTokenTrait; use StringTemplateTrait; @@ -72,7 +71,7 @@ class FormHelper extends Helper */ protected $_datetimeOptions = [ 'interval', 'round', 'monthNames', 'minYear', 'maxYear', - 'orderYear', 'timeFormat', 'second' + 'orderYear', 'timeFormat', 'second', ]; /** @@ -162,8 +161,10 @@ class FormHelper extends Helper 'textarea' => '', // Container for submit buttons. 'submitContainer' => '
{{content}}
', - //Confirm javascript template for postLink() + // Confirm javascript template for postLink() 'confirmJs' => '{{confirm}}', + // selected class + 'selectedClass' => 'selected', ], // set HTML5 validation message to custom required/empty messages 'autoSetCustomValidity' => false, @@ -191,7 +192,7 @@ class FormHelper extends Helper /** * List of fields created, used with secure forms. * - * @var array + * @var string[] */ public $fields = []; @@ -307,9 +308,9 @@ public function __construct(View $View, array $config = []) /** * Set the widget registry the helper will use. * - * @param \Cake\View\Widget\WidgetRegistry|null $instance The registry instance to set. + * @param \Cake\View\Widget\WidgetLocator|null $instance The registry instance to set. * @param array $widgets An array of widgets - * @return \Cake\View\Widget\WidgetRegistry + * @return \Cake\View\Widget\WidgetLocator * @deprecated 3.6.0 Use FormHelper::widgetLocator() instead. */ public function widgetRegistry(WidgetRegistry $instance = null, $widgets = []) @@ -396,15 +397,19 @@ public function contextFactory(ContextFactory $instance = null, array $contexts * * @param mixed $context The context for which the form is being defined. * Can be a ContextInterface instance, ORM entity, ORM resultset, or an - * array of meta data. You can use false or null to make a context-less form. + * array of meta data. You can use null to make a context-less form. * @param array $options An array of html attributes and options. * @return string An formatted opening FORM tag. - * @link https://book.cakephp.org/3.0/en/views/helpers/form.html#Cake\View\Helper\FormHelper::create + * @link https://book.cakephp.org/3/en/views/helpers/form.html#Cake\View\Helper\FormHelper::create */ public function create($context = null, array $options = []) { $append = ''; + if (is_bool($context) || is_string($context)) { + deprecationWarning('Using `string` or `bool` for $context is deprecated, use `null` to make a context-less form.'); + } + if ($context instanceof ContextInterface) { $this->context($context); } else { @@ -480,7 +485,7 @@ public function create($context = null, array $options = []) $append .= $this->hidden('_method', [ 'name' => '_method', 'value' => strtoupper($options['type']), - 'secure' => static::SECURE_SKIP + 'secure' => static::SECURE_SKIP, ]); // Default to post method default: @@ -515,7 +520,7 @@ public function create($context = null, array $options = []) return $this->formatTemplate('formStart', [ 'attrs' => $templater->formatAttributes($htmlAttributes) . $actionAttr, - 'templateVars' => isset($options['templateVars']) ? $options['templateVars'] : [] + 'templateVars' => isset($options['templateVars']) ? $options['templateVars'] : [], ]) . $append; } @@ -534,7 +539,8 @@ protected function _formUrl($context, $options) return $request->getRequestTarget(); } - if (is_string($options['url']) || + if ( + is_string($options['url']) || (is_array($options['url']) && isset($options['url']['_name'])) ) { return $options['url']; @@ -566,7 +572,7 @@ protected function _formUrl($context, $options) /** * Correctly store the last created form action URL. * - * @param string|array $url The URL of the last form. + * @param string|array|null $url The URL of the last form. * @return void */ protected function _lastAction($url) @@ -615,7 +621,7 @@ protected function _csrfField() * @param array $secureAttributes Secure attributes which will be passed as HTML attributes * into the hidden input elements generated for the Security Component. * @return string A closing FORM tag. - * @link https://book.cakephp.org/3.0/en/views/helpers/form.html#closing-the-form + * @link https://book.cakephp.org/3/en/views/helpers/form.html#closing-the-form */ public function end(array $secureAttributes = []) { @@ -683,7 +689,7 @@ public function secure(array $fields = [], array $secureAttributes = []) 'value' => urlencode(json_encode([ $this->_lastAction, $fields, - $this->_unlockedFields + $this->_unlockedFields, ])), ]); $out .= $this->hidden('_Token.debug', $tokenDebug); @@ -700,7 +706,7 @@ public function secure(array $fields = [], array $secureAttributes = []) * * @param string|null $name The dot separated name for the field. * @return array|null Either null, or the list of fields. - * @link https://book.cakephp.org/3.0/en/views/helpers/form.html#working-with-securitycomponent + * @link https://book.cakephp.org/3/en/views/helpers/form.html#working-with-securitycomponent */ public function unlockField($name = null) { @@ -770,7 +776,7 @@ protected function _secure($lock, $field, $value = null) * * @param string $field This should be "modelname.fieldname" * @return bool If there are errors this method returns true, else false. - * @link https://book.cakephp.org/3.0/en/views/helpers/form.html#displaying-and-checking-errors + * @link https://book.cakephp.org/3/en/views/helpers/form.html#displaying-and-checking-errors */ public function isFieldError($field) { @@ -792,7 +798,7 @@ public function isFieldError($field) * it should be a hash of key names => messages. * @param array $options See above. * @return string Formatted errors or ''. - * @link https://book.cakephp.org/3.0/en/views/helpers/form.html#displaying-and-checking-errors + * @link https://book.cakephp.org/3/en/views/helpers/form.html#displaying-and-checking-errors */ public function error($field, $text = null, array $options = []) { @@ -837,7 +843,7 @@ public function error($field, $text = null, array $options = []) $errorText[] = $this->formatTemplate('errorItem', ['text' => $err]); } $error = $this->formatTemplate('errorList', [ - 'content' => implode('', $errorText) + 'content' => implode('', $errorText), ]); } else { $error = array_pop($error); @@ -903,7 +909,7 @@ public function error($field, $text = null, array $options = []) * fieldName. * @param array $options An array of HTML attributes. * @return string The formatted LABEL element - * @link https://book.cakephp.org/3.0/en/views/helpers/form.html#creating-labels + * @link https://book.cakephp.org/3/en/views/helpers/form.html#creating-labels */ public function label($fieldName, $text = null, array $options = []) { @@ -971,7 +977,7 @@ public function label($fieldName, $text = null, array $options = []) * - `legend` Set to false to disable the legend for the generated control set. Or supply a string * to customize the legend text. * @return string Completed form controls. - * @link https://book.cakephp.org/3.0/en/views/helpers/form.html#generating-entire-forms + * @link https://book.cakephp.org/3/en/views/helpers/form.html#generating-entire-forms */ public function allControls(array $fields = [], array $options = []) { @@ -1000,7 +1006,7 @@ public function allControls(array $fields = [], array $options = []) * - `legend` Set to false to disable the legend for the generated control set. Or supply a string * to customize the legend text. * @return string Completed form controls. - * @link https://book.cakephp.org/3.0/en/views/helpers/form.html#generating-entire-forms + * @link https://book.cakephp.org/3/en/views/helpers/form.html#generating-entire-forms * @deprecated 3.4.0 Use FormHelper::allControls() instead. */ public function allInputs(array $fields = [], array $options = []) @@ -1033,7 +1039,7 @@ public function allInputs(array $fields = [], array $options = []) * - `legend` Set to false to disable the legend for the generated input set. * Or supply a string to customize the legend text. * @return string Completed form inputs. - * @link https://book.cakephp.org/3.0/en/views/helpers/form.html#generating-entire-forms + * @link https://book.cakephp.org/3/en/views/helpers/form.html#generating-entire-forms */ public function controls(array $fields, array $options = []) { @@ -1063,7 +1069,7 @@ public function controls(array $fields, array $options = []) * - `legend` Set to false to disable the legend for the generated input set. * Or supply a string to customize the legend text. * @return string Completed form inputs. - * @link https://book.cakephp.org/3.0/en/views/helpers/form.html#generating-entire-forms + * @link https://book.cakephp.org/3/en/views/helpers/form.html#generating-entire-forms * @deprecated 3.4.0 Use FormHelper::controls() instead. */ public function inputs(array $fields, array $options = []) @@ -1132,7 +1138,7 @@ public function fieldset($fields = '', array $options = []) * ### Options * * See each field type method for more information. Any options that are part of - * $attributes or $options for the different **type** methods can be included in `$options` for input(). + * $attributes or $options for the different **type** methods can be included in `$options` for control(). * Additionally, any unknown keys that are not in the list below, or part of the selected type's options * will be treated as a regular HTML attribute for the generated input. * @@ -1155,7 +1161,7 @@ public function fieldset($fields = '', array $options = []) * @param string $fieldName This should be "modelname.fieldname" * @param array $options Each type of input takes different options. * @return string Completed form widget. - * @link https://book.cakephp.org/3.0/en/views/helpers/form.html#creating-form-inputs + * @link https://book.cakephp.org/3/en/views/helpers/form.html#creating-form-inputs */ public function control($fieldName, array $options = []) { @@ -1167,7 +1173,7 @@ public function control($fieldName, array $options = []) 'options' => null, 'templates' => [], 'templateVars' => [], - 'labelOptions' => true + 'labelOptions' => true, ]; $options = $this->_parseOptions($fieldName, $options); $options += ['id' => $this->_domId($fieldName)]; @@ -1230,7 +1236,7 @@ public function control($fieldName, array $options = []) 'content' => $result, 'error' => $error, 'errorSuffix' => $errorSuffix, - 'options' => $options + 'options' => $options, ]); if ($newTemplates) { @@ -1246,7 +1252,7 @@ public function control($fieldName, array $options = []) * @param string $fieldName This should be "modelname.fieldname" * @param array $options Each type of input takes different options. * @return string Completed form widget. - * @link https://book.cakephp.org/3.0/en/views/helpers/form.html#creating-form-inputs + * @link https://book.cakephp.org/3/en/views/helpers/form.html#creating-form-inputs * @deprecated 3.4.0 Use FormHelper::control() instead. */ public function input($fieldName, array $options = []) @@ -1276,7 +1282,7 @@ protected function _groupTemplate($options) 'input' => isset($options['input']) ? $options['input'] : [], 'label' => $options['label'], 'error' => $options['error'], - 'templateVars' => isset($options['options']['templateVars']) ? $options['options']['templateVars'] : [] + 'templateVars' => isset($options['options']['templateVars']) ? $options['options']['templateVars'] : [], ]); } @@ -1298,7 +1304,7 @@ protected function _inputContainerTemplate($options) 'error' => $options['error'], 'required' => $options['options']['required'] ? ' required' : '', 'type' => $options['options']['type'], - 'templateVars' => isset($options['options']['templateVars']) ? $options['options']['templateVars'] : [] + 'templateVars' => isset($options['options']['templateVars']) ? $options['options']['templateVars'] : [], ]); } @@ -1453,7 +1459,7 @@ protected function _magicOptions($fieldName, $options, $allowOverride) $context = $this->_getContext(); $options += [ - 'templateVars' => [] + 'templateVars' => [], ]; if (!isset($options['required']) && $options['type'] !== 'hidden') { @@ -1504,7 +1510,8 @@ protected function _magicOptions($fieldName, $options, $allowOverride) } $typesWithMaxLength = ['text', 'textarea', 'email', 'tel', 'url', 'search']; - if (!array_key_exists('maxlength', $options) + if ( + !array_key_exists('maxlength', $options) && in_array($options['type'], $typesWithMaxLength) ) { $maxLength = null; @@ -1630,7 +1637,7 @@ protected function _inputLabel($fieldName, $label, $options) * @param string $fieldName Name of a field, like this "modelname.fieldname" * @param array $options Array of HTML attributes. * @return string|array An HTML text input element. - * @link https://book.cakephp.org/3.0/en/views/helpers/form.html#creating-checkboxes + * @link https://book.cakephp.org/3/en/views/helpers/form.html#creating-checkboxes */ public function checkbox($fieldName, array $options = []) { @@ -1648,7 +1655,7 @@ public function checkbox($fieldName, array $options = []) 'name' => $options['name'], 'value' => $options['hiddenField'] !== true && $options['hiddenField'] !== '_split' ? $options['hiddenField'] : '0', 'form' => isset($options['form']) ? $options['form'] : null, - 'secure' => false + 'secure' => false, ]; if (isset($options['disabled']) && $options['disabled']) { $hiddenOptions['disabled'] = 'disabled'; @@ -1686,7 +1693,7 @@ public function checkbox($fieldName, array $options = []) * @param array|\Traversable $options Radio button options array. * @param array $attributes Array of attributes. * @return string Completed radio widget set. - * @link https://book.cakephp.org/3.0/en/views/helpers/form.html#creating-radio-buttons + * @link https://book.cakephp.org/3/en/views/helpers/form.html#creating-radio-buttons */ public function radio($fieldName, $options = [], array $attributes = []) { @@ -1761,7 +1768,7 @@ public function __call($method, $params) * @param string $fieldName Name of a field, in the form "modelname.fieldname" * @param array $options Array of HTML attributes, and special options above. * @return string A generated HTML text input element - * @link https://book.cakephp.org/3.0/en/views/helpers/form.html#creating-textareas + * @link https://book.cakephp.org/3/en/views/helpers/form.html#creating-textareas */ public function textarea($fieldName, array $options = []) { @@ -1777,7 +1784,7 @@ public function textarea($fieldName, array $options = []) * @param string $fieldName Name of a field, in the form of "modelname.fieldname" * @param array $options Array of HTML attributes. * @return string A generated hidden input - * @link https://book.cakephp.org/3.0/en/views/helpers/form.html#creating-hidden-inputs + * @link https://book.cakephp.org/3/en/views/helpers/form.html#creating-hidden-inputs */ public function hidden($fieldName, array $options = []) { @@ -1806,7 +1813,7 @@ public function hidden($fieldName, array $options = []) * @param string $fieldName Name of a field, in the form "modelname.fieldname" * @param array $options Array of HTML attributes. * @return string A generated file input. - * @link https://book.cakephp.org/3.0/en/views/helpers/form.html#creating-file-inputs + * @link https://book.cakephp.org/3/en/views/helpers/form.html#creating-file-inputs */ public function file($fieldName, array $options = []) { @@ -1832,7 +1839,7 @@ public function file($fieldName, array $options = []) * @param string $title The button's caption. Not automatically HTML encoded * @param array $options Array of options and HTML attributes. * @return string A HTML button tag. - * @link https://book.cakephp.org/3.0/en/views/helpers/form.html#creating-button-elements + * @link https://book.cakephp.org/3/en/views/helpers/form.html#creating-button-elements */ public function button($title, array $options = []) { @@ -1867,7 +1874,7 @@ public function button($title, array $options = []) * @param string|array $url URL as string or array * @param array $options Array of options and HTML attributes. * @return string A HTML button tag. - * @link https://book.cakephp.org/3.0/en/views/helpers/form.html#creating-standalone-buttons-and-post-links + * @link https://book.cakephp.org/3/en/views/helpers/form.html#creating-standalone-buttons-and-post-links */ public function postButton($title, $url, array $options = []) { @@ -1880,7 +1887,7 @@ public function postButton($title, $url, array $options = []) $formOptions = $options['form'] + $formOptions; unset($options['form']); } - $out = $this->create(false, $formOptions); + $out = $this->create(null, $formOptions); if (isset($options['data']) && is_array($options['data'])) { foreach (Hash::flatten($options['data']) as $key => $value) { $out .= $this->hidden($key, ['value' => $value]); @@ -1920,7 +1927,7 @@ public function postButton($title, $url, array $options = []) * external URL (starts with http://) * @param array $options Array of HTML attributes. * @return string An `` element. - * @link https://book.cakephp.org/3.0/en/views/helpers/form.html#creating-standalone-buttons-and-post-links + * @link https://book.cakephp.org/3/en/views/helpers/form.html#creating-standalone-buttons-and-post-links */ public function postLink($title, $url = null, array $options = []) { @@ -1952,15 +1959,15 @@ public function postLink($title, $url = null, array $options = []) $action = $templater->formatAttributes([ 'action' => $this->Url->build($url), - 'escape' => false + 'escape' => false, ]); $out = $this->formatTemplate('formStart', [ - 'attrs' => $templater->formatAttributes($formOptions) . $action + 'attrs' => $templater->formatAttributes($formOptions) . $action, ]); $out .= $this->hidden('_method', [ 'value' => $requestMethod, - 'secure' => static::SECURE_SKIP + 'secure' => static::SECURE_SKIP, ]); $out .= $this->_csrfField(); @@ -1996,7 +2003,7 @@ public function postLink($title, $url = null, array $options = []) $options['onclick'] = $this->templater()->format('confirmJs', [ 'confirmMessage' => $this->_cleanConfirmMessage($confirmMessage), 'formName' => $formName, - 'confirm' => $confirm + 'confirm' => $confirm, ]); $out .= $this->Html->link($title, $url, $options); @@ -2021,7 +2028,7 @@ public function postLink($title, $url = null, array $options = []) * OR if the first character is not /, image is relative to webroot/img. * @param array $options Array of options. See above. * @return string A HTML submit button - * @link https://book.cakephp.org/3.0/en/views/helpers/form.html#creating-buttons-and-submit-elements + * @link https://book.cakephp.org/3/en/views/helpers/form.html#creating-buttons-and-submit-elements */ public function submit($caption = null, array $options = []) { @@ -2031,7 +2038,7 @@ public function submit($caption = null, array $options = []) $options += [ 'type' => 'submit', 'secure' => false, - 'templateVars' => [] + 'templateVars' => [], ]; if (isset($options['name'])) { @@ -2050,7 +2057,7 @@ public function submit($caption = null, array $options = []) if (isset($options['name'])) { $unlockFields = [ $options['name'] . '_x', - $options['name'] . '_y' + $options['name'] . '_y', ]; } foreach ($unlockFields as $ignore) { @@ -2076,12 +2083,12 @@ public function submit($caption = null, array $options = []) $input = $this->formatTemplate('inputSubmit', [ 'type' => $type, 'attrs' => $this->templater()->formatAttributes($options), - 'templateVars' => $options['templateVars'] + 'templateVars' => $options['templateVars'], ]); return $this->formatTemplate('submitContainer', [ 'content' => $input, - 'templateVars' => $options['templateVars'] + 'templateVars' => $options['templateVars'], ]); } @@ -2136,7 +2143,7 @@ public function submit($caption = null, array $options = []) * @param array $attributes The HTML attributes of the select element. * @return string Formatted SELECT element * @see \Cake\View\Helper\FormHelper::multiCheckbox() for creating multiple checkboxes. - * @link https://book.cakephp.org/3.0/en/views/helpers/form.html#creating-select-pickers + * @link https://book.cakephp.org/3/en/views/helpers/form.html#creating-select-pickers */ public function select($fieldName, $options = [], array $attributes = []) { @@ -2159,7 +2166,8 @@ public function select($fieldName, $options = [], array $attributes = []) // Secure the field if there are options, or it's a multi select. // Single selects with no options don't submit, but multiselects do. - if ($attributes['secure'] && + if ( + $attributes['secure'] && empty($options) && empty($attributes['empty']) && empty($attributes['multiple']) @@ -2277,7 +2285,7 @@ protected function _singleDatetime($options, $keep) * @param string|null $fieldName Prefix name for the SELECT element * @param array $options Options & HTML attributes for the select element * @return string A generated day select box. - * @link https://book.cakephp.org/3.0/en/views/helpers/form.html#creating-day-inputs + * @link https://book.cakephp.org/3/en/views/helpers/form.html#creating-day-inputs */ public function day($fieldName = null, array $options = []) { @@ -2287,7 +2295,7 @@ public function day($fieldName = null, array $options = []) $options['val'] = [ 'year' => date('Y'), 'month' => date('m'), - 'day' => (int)$options['val'] + 'day' => (int)$options['val'], ]; } @@ -2310,7 +2318,7 @@ public function day($fieldName = null, array $options = []) * @param string $fieldName Prefix name for the SELECT element * @param array $options Options & attributes for the select elements. * @return string Completed year select input - * @link https://book.cakephp.org/3.0/en/views/helpers/form.html#creating-year-inputs + * @link https://book.cakephp.org/3/en/views/helpers/form.html#creating-year-inputs */ public function year($fieldName, array $options = []) { @@ -2321,7 +2329,7 @@ public function year($fieldName, array $options = []) $options['val'] = [ 'year' => (int)$options['val'], 'month' => date('m'), - 'day' => date('d') + 'day' => date('d'), ]; } @@ -2342,7 +2350,7 @@ public function year($fieldName, array $options = []) * @param string $fieldName Prefix name for the SELECT element * @param array $options Attributes for the select element * @return string A generated month select dropdown. - * @link https://book.cakephp.org/3.0/en/views/helpers/form.html#creating-month-inputs + * @link https://book.cakephp.org/3/en/views/helpers/form.html#creating-month-inputs */ public function month($fieldName, array $options = []) { @@ -2352,7 +2360,7 @@ public function month($fieldName, array $options = []) $options['val'] = [ 'year' => date('Y'), 'month' => (int)$options['val'], - 'day' => date('d') + 'day' => date('d'), ]; } @@ -2372,7 +2380,7 @@ public function month($fieldName, array $options = []) * @param string $fieldName Prefix name for the SELECT element * @param array $options List of HTML attributes * @return string Completed hour select input - * @link https://book.cakephp.org/3.0/en/views/helpers/form.html#creating-hour-inputs + * @link https://book.cakephp.org/3/en/views/helpers/form.html#creating-hour-inputs */ public function hour($fieldName, array $options = []) { @@ -2407,7 +2415,7 @@ public function hour($fieldName, array $options = []) * @param string $fieldName Prefix name for the SELECT element * @param array $options Array of options. * @return string Completed minute select input. - * @link https://book.cakephp.org/3.0/en/views/helpers/form.html#creating-minute-inputs + * @link https://book.cakephp.org/3/en/views/helpers/form.html#creating-minute-inputs */ public function minute($fieldName, array $options = []) { @@ -2435,7 +2443,7 @@ public function minute($fieldName, array $options = []) * @param string $fieldName Prefix name for the SELECT element * @param array $options Array of options * @return string Completed meridian select input - * @link https://book.cakephp.org/3.0/en/views/helpers/form.html#creating-meridian-inputs + * @link https://book.cakephp.org/3/en/views/helpers/form.html#creating-meridian-inputs */ public function meridian($fieldName, array $options = []) { @@ -2487,7 +2495,7 @@ public function meridian($fieldName, array $options = []) * @param string $fieldName Prefix name for the SELECT element * @param array $options Array of Options * @return string Generated set of select boxes for the date and time formats chosen. - * @link https://book.cakephp.org/3.0/en/views/helpers/form.html#creating-date-and-time-inputs + * @link https://book.cakephp.org/3/en/views/helpers/form.html#creating-date-and-time-inputs */ public function dateTime($fieldName, array $options = []) { @@ -2525,10 +2533,10 @@ protected function _datetimeOptions($options) $options[$type] = []; } - // Pass empty options to each type. - if (!empty($options['empty']) && - is_array($options[$type]) - ) { + // Pass boolean/scalar empty options to each type. + if (is_array($options[$type]) && isset($options['empty']) && !is_array($options['empty'])) { + $options[$type]['empty'] = $options['empty']; + } elseif (is_array($options[$type]) && !empty($options['empty'])) { $options[$type]['empty'] = $options['empty']; } @@ -2956,7 +2964,7 @@ public function getSourceValue($fieldname, $options = []) { $valueMap = [ 'data' => 'getData', - 'query' => 'getQuery' + 'query' => 'getQuery', ]; foreach ($this->getValueSources() as $valuesSource) { if ($valuesSource === 'context') { diff --git a/app/vendor/cakephp/cakephp/src/View/Helper/HtmlHelper.php b/app/vendor/cakephp/cakephp/src/View/Helper/HtmlHelper.php index c27745aea..6eb4619d1 100644 --- a/app/vendor/cakephp/cakephp/src/View/Helper/HtmlHelper.php +++ b/app/vendor/cakephp/cakephp/src/View/Helper/HtmlHelper.php @@ -26,11 +26,10 @@ * HtmlHelper encloses all methods needed while working with HTML pages. * * @property \Cake\View\Helper\UrlHelper $Url - * @link https://book.cakephp.org/3.0/en/views/helpers/html.html + * @link https://book.cakephp.org/3/en/views/helpers/html.html */ class HtmlHelper extends Helper { - use StringTemplateTrait; /** @@ -82,8 +81,8 @@ class HtmlHelper extends Helper 'javascriptstart' => '', 'javascriptend' => '', - 'confirmJs' => '{{confirm}}' - ] + 'confirmJs' => '{{confirm}}', + ], ]; /** @@ -121,7 +120,7 @@ class HtmlHelper extends Helper 'xhtml-strict' => '', 'xhtml-trans' => '', 'xhtml-frame' => '', - 'xhtml11' => '' + 'xhtml11' => '', ]; /** @@ -154,7 +153,7 @@ public function __construct(View $View, array $config = []) * @param array $options Link attributes e.g. ['id' => 'selected'] * @return $this * @see \Cake\View\Helper\HtmlHelper::link() for details on $options that can be used. - * @link https://book.cakephp.org/3.0/en/views/helpers/html.html#creating-breadcrumb-trails-with-htmlhelper + * @link https://book.cakephp.org/3/en/views/helpers/html.html#creating-breadcrumb-trails-with-htmlhelper * @deprecated 3.3.6 Use the BreadcrumbsHelper instead */ public function addCrumb($name, $link = null, array $options = []) @@ -185,10 +184,13 @@ public function addCrumb($name, $link = null, array $options = []) * * @param string $type Doctype to use. * @return string|null Doctype string - * @link https://book.cakephp.org/3.0/en/views/helpers/html.html#creating-doctype-tags + * @link https://book.cakephp.org/3/en/views/helpers/html.html#creating-doctype-tags + * @deprecated 3.9.0 This method will be removed in 4.0.0. */ public function docType($type = 'html5') { + deprecationWarning('HtmlHelper::docType() is deprecated and will be removed in 4.0.0'); + if (isset($this->_docTypes[$type])) { return $this->_docTypes[$type]; } @@ -234,7 +236,7 @@ public function docType($type = 'html5') * @param array $options Other attributes for the generated tag. If the type attribute is html, * rss, atom, or icon, the mime-type is returned. * @return string|null A completed `` element, or null if the element was sent to a block. - * @link https://book.cakephp.org/3.0/en/views/helpers/html.html#creating-meta-tags + * @link https://book.cakephp.org/3/en/views/helpers/html.html#creating-meta-tags */ public function meta($type, $content = null, array $options = []) { @@ -251,7 +253,7 @@ public function meta($type, $content = null, array $options = []) 'next' => ['rel' => 'next', 'link' => $content], 'prev' => ['rel' => 'prev', 'link' => $content], 'first' => ['rel' => 'first', 'link' => $content], - 'last' => ['rel' => 'last', 'link' => $content] + 'last' => ['rel' => 'last', 'link' => $content], ]; if ($type === 'icon' && $content === null) { @@ -278,21 +280,25 @@ public function meta($type, $content = null, array $options = []) $out = null; if (isset($options['link'])) { - $options['link'] = $this->Url->assetUrl($options['link']); + if (is_array($options['link'])) { + $options['link'] = $this->Url->build($options['link']); + } else { + $options['link'] = $this->Url->assetUrl($options['link']); + } if (isset($options['rel']) && $options['rel'] === 'icon') { $out = $this->formatTemplate('metalink', [ 'url' => $options['link'], - 'attrs' => $this->templater()->formatAttributes($options, ['block', 'link']) + 'attrs' => $this->templater()->formatAttributes($options, ['block', 'link']), ]); $options['rel'] = 'shortcut icon'; } $out .= $this->formatTemplate('metalink', [ 'url' => $options['link'], - 'attrs' => $this->templater()->formatAttributes($options, ['block', 'link']) + 'attrs' => $this->templater()->formatAttributes($options, ['block', 'link']), ]); } else { $out = $this->formatTemplate('meta', [ - 'attrs' => $this->templater()->formatAttributes($options, ['block', 'type']) + 'attrs' => $this->templater()->formatAttributes($options, ['block', 'type']), ]); } @@ -311,7 +317,7 @@ public function meta($type, $content = null, array $options = []) * @param string|null $charset The character set to be used in the meta tag. If empty, * The App.encoding value will be used. Example: "utf-8". * @return string A meta tag containing the specified character set. - * @link https://book.cakephp.org/3.0/en/views/helpers/html.html#creating-charset-tags + * @link https://book.cakephp.org/3/en/views/helpers/html.html#creating-charset-tags */ public function charset($charset = null) { @@ -320,7 +326,7 @@ public function charset($charset = null) } return $this->formatTemplate('charset', [ - 'charset' => !empty($charset) ? $charset : 'utf-8' + 'charset' => !empty($charset) ? $charset : 'utf-8', ]); } @@ -346,7 +352,7 @@ public function charset($charset = null) * external URL (starts with http://) * @param array $options Array of options and HTML attributes. * @return string An `` element. - * @link https://book.cakephp.org/3.0/en/views/helpers/html.html#creating-links + * @link https://book.cakephp.org/3/en/views/helpers/html.html#creating-links */ public function link($title, $url = null, array $options = []) { @@ -384,14 +390,14 @@ public function link($title, $url = null, array $options = []) $confirm = $this->_confirm($confirmMessage, 'return true;', 'return false;', $options); $options['onclick'] = $templater->format('confirmJs', [ 'confirmMessage' => $this->_cleanConfirmMessage($confirmMessage), - 'confirm' => $confirm + 'confirm' => $confirm, ]); } return $templater->format('link', [ 'url' => $url, 'attrs' => $templater->formatAttributes($options), - 'content' => $title + 'content' => $title, ]); } @@ -440,7 +446,7 @@ public function link($title, $url = null, array $options = []) * of your application. Otherwise, the path will be relative to your CSS path, usually webroot/css. * @param array $options Array of options and HTML arguments. * @return string|null CSS `` or `"); + $this->initialized = true; + } + + $title = '-'; + if (isset($context['request'])) { + $request = $context['request']; + $controller = "{$this->dumper->dump($request['controller'], true, ['maxDepth' => 0])}"; + $title = sprintf('%s %s', $request['method'], $uri = $request['uri'], $uri); + $dedupIdentifier = $request['identifier']; + } elseif (isset($context['cli'])) { + $title = '$ '.$context['cli']['command_line']; + $dedupIdentifier = $context['cli']['identifier']; + } else { + $dedupIdentifier = uniqid('', true); + } + + $sourceDescription = ''; + if (isset($context['source'])) { + $source = $context['source']; + $projectDir = $source['project_dir'] ?? null; + $sourceDescription = sprintf('%s on line %d', $source['name'], $source['line']); + if (isset($source['file_link'])) { + $sourceDescription = sprintf('%s', $source['file_link'], $sourceDescription); + } + } + + $isoDate = $this->extractDate($context, 'c'); + $tags = array_filter([ + 'controller' => $controller ?? null, + 'project dir' => $projectDir ?? null, + ]); + + $output->writeln(<< +
+
+

$title

+ +
+ {$this->renderTags($tags)} +
+
+

+ $sourceDescription +

+ {$this->dumper->dump($data, true)} +
+ +HTML + ); + } + + private function extractDate(array $context, string $format = 'r'): string + { + return date($format, (int) $context['timestamp']); + } + + private function renderTags(array $tags): string + { + if (!$tags) { + return ''; + } + + $renderedTags = ''; + foreach ($tags as $key => $value) { + $renderedTags .= sprintf('
  • %s%s
  • ', $key, $value); + } + + return << +
      + $renderedTags +
    + +HTML; + } +} diff --git a/app/vendor/symfony/var-dumper/Command/ServerDumpCommand.php b/app/vendor/symfony/var-dumper/Command/ServerDumpCommand.php new file mode 100644 index 000000000..b66301b52 --- /dev/null +++ b/app/vendor/symfony/var-dumper/Command/ServerDumpCommand.php @@ -0,0 +1,101 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Command; + +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Exception\InvalidArgumentException; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Style\SymfonyStyle; +use Symfony\Component\VarDumper\Cloner\Data; +use Symfony\Component\VarDumper\Command\Descriptor\CliDescriptor; +use Symfony\Component\VarDumper\Command\Descriptor\DumpDescriptorInterface; +use Symfony\Component\VarDumper\Command\Descriptor\HtmlDescriptor; +use Symfony\Component\VarDumper\Dumper\CliDumper; +use Symfony\Component\VarDumper\Dumper\HtmlDumper; +use Symfony\Component\VarDumper\Server\DumpServer; + +/** + * Starts a dump server to collect and output dumps on a single place with multiple formats support. + * + * @author Maxime Steinhausser + * + * @final + */ +class ServerDumpCommand extends Command +{ + protected static $defaultName = 'server:dump'; + + private $server; + + /** @var DumpDescriptorInterface[] */ + private $descriptors; + + public function __construct(DumpServer $server, array $descriptors = []) + { + $this->server = $server; + $this->descriptors = $descriptors + [ + 'cli' => new CliDescriptor(new CliDumper()), + 'html' => new HtmlDescriptor(new HtmlDumper()), + ]; + + parent::__construct(); + } + + protected function configure() + { + $availableFormats = implode(', ', array_keys($this->descriptors)); + + $this + ->addOption('format', null, InputOption::VALUE_REQUIRED, sprintf('The output format (%s)', $availableFormats), 'cli') + ->setDescription('Start a dump server that collects and displays dumps in a single place') + ->setHelp(<<<'EOF' +%command.name% starts a dump server that collects and displays +dumps in a single place for debugging you application: + + php %command.full_name% + +You can consult dumped data in HTML format in your browser by providing the --format=html option +and redirecting the output to a file: + + php %command.full_name% --format="html" > dump.html + +EOF + ) + ; + } + + protected function execute(InputInterface $input, OutputInterface $output): int + { + $io = new SymfonyStyle($input, $output); + $format = $input->getOption('format'); + + if (!$descriptor = $this->descriptors[$format] ?? null) { + throw new InvalidArgumentException(sprintf('Unsupported format "%s".', $format)); + } + + $errorIo = $io->getErrorStyle(); + $errorIo->title('Symfony Var Dumper Server'); + + $this->server->start(); + + $errorIo->success(sprintf('Server listening on %s', $this->server->getHost())); + $errorIo->comment('Quit the server with CONTROL-C.'); + + $this->server->listen(function (Data $data, array $context, int $clientId) use ($descriptor, $io) { + $descriptor->describe($io, $data, $context, $clientId); + }); + + return 0; + } +} diff --git a/app/vendor/symfony/var-dumper/Dumper/AbstractDumper.php b/app/vendor/symfony/var-dumper/Dumper/AbstractDumper.php index 228f8f2e5..4ddaf5e74 100644 --- a/app/vendor/symfony/var-dumper/Dumper/AbstractDumper.php +++ b/app/vendor/symfony/var-dumper/Dumper/AbstractDumper.php @@ -21,10 +21,10 @@ */ abstract class AbstractDumper implements DataDumperInterface, DumperInterface { - const DUMP_LIGHT_ARRAY = 1; - const DUMP_STRING_LENGTH = 2; - const DUMP_COMMA_SEPARATOR = 4; - const DUMP_TRAILING_COMMA = 8; + public const DUMP_LIGHT_ARRAY = 1; + public const DUMP_STRING_LENGTH = 2; + public const DUMP_COMMA_SEPARATOR = 4; + public const DUMP_TRAILING_COMMA = 8; public static $defaultOutput = 'php://output'; @@ -35,16 +35,16 @@ abstract class AbstractDumper implements DataDumperInterface, DumperInterface protected $indentPad = ' '; protected $flags; - private $charset; + private $charset = ''; /** * @param callable|resource|string|null $output A line dumper callable, an opened stream or an output path, defaults to static::$defaultOutput - * @param string $charset The default character encoding to use for non-UTF8 strings + * @param string|null $charset The default character encoding to use for non-UTF8 strings * @param int $flags A bit field of static::DUMP_* constants to fine tune dumps representation */ - public function __construct($output = null, $charset = null, $flags = 0) + public function __construct($output = null, string $charset = null, int $flags = 0) { - $this->flags = (int) $flags; + $this->flags = $flags; $this->setCharset($charset ?: ini_get('php.output_encoding') ?: ini_get('default_charset') ?: 'UTF-8'); $this->decimalPoint = localeconv(); $this->decimalPoint = $this->decimalPoint['decimal_point']; @@ -63,17 +63,17 @@ public function __construct($output = null, $charset = null, $flags = 0) */ public function setOutput($output) { - $prev = null !== $this->outputStream ? $this->outputStream : $this->lineDumper; + $prev = $this->outputStream ?? $this->lineDumper; if (\is_callable($output)) { $this->outputStream = null; $this->lineDumper = $output; } else { if (\is_string($output)) { - $output = fopen($output, 'wb'); + $output = fopen($output, 'w'); } $this->outputStream = $output; - $this->lineDumper = array($this, 'echoLine'); + $this->lineDumper = [$this, 'echoLine']; } return $prev; @@ -116,7 +116,6 @@ public function setIndentPad($pad) /** * Dumps a Data object. * - * @param Data $data A Data object * @param callable|resource|string|true|null $output A line dumper callable, an opened stream, an output path or true to return the dump * * @return string|null The dump as string when $output is true @@ -126,12 +125,12 @@ public function dump(Data $data, $output = null) $this->decimalPoint = localeconv(); $this->decimalPoint = $this->decimalPoint['decimal_point']; - if ($locale = $this->flags & (self::DUMP_COMMA_SEPARATOR | self::DUMP_TRAILING_COMMA) ? setlocale(LC_NUMERIC, 0) : null) { - setlocale(LC_NUMERIC, 'C'); + if ($locale = $this->flags & (self::DUMP_COMMA_SEPARATOR | self::DUMP_TRAILING_COMMA) ? setlocale(\LC_NUMERIC, 0) : null) { + setlocale(\LC_NUMERIC, 'C'); } if ($returnDump = true === $output) { - $output = fopen('php://memory', 'r+b'); + $output = fopen('php://memory', 'r+'); } if ($output) { $prevOutput = $this->setOutput($output); @@ -151,9 +150,11 @@ public function dump(Data $data, $output = null) $this->setOutput($prevOutput); } if ($locale) { - setlocale(LC_NUMERIC, $locale); + setlocale(\LC_NUMERIC, $locale); } } + + return null; } /** @@ -164,7 +165,7 @@ public function dump(Data $data, $output = null) */ protected function dumpLine($depth) { - \call_user_func($this->lineDumper, $this->line, $depth, $this->indentPad); + ($this->lineDumper)($this->line, $depth, $this->indentPad); $this->line = ''; } @@ -185,13 +186,13 @@ protected function echoLine($line, $depth, $indentPad) /** * Converts a non-UTF-8 string to UTF-8. * - * @param string $s The non-UTF-8 string to convert + * @param string|null $s The non-UTF-8 string to convert * - * @return string The string converted to UTF-8 + * @return string|null The string converted to UTF-8 */ protected function utf8Encode($s) { - if (preg_match('//u', $s)) { + if (null === $s || preg_match('//u', $s)) { return $s; } diff --git a/app/vendor/symfony/var-dumper/Dumper/CliDumper.php b/app/vendor/symfony/var-dumper/Dumper/CliDumper.php index 419cfeb49..b3d9e2561 100644 --- a/app/vendor/symfony/var-dumper/Dumper/CliDumper.php +++ b/app/vendor/symfony/var-dumper/Dumper/CliDumper.php @@ -26,9 +26,9 @@ class CliDumper extends AbstractDumper protected $colors; protected $maxStringWidth = 0; - protected $styles = array( + protected $styles = [ // See http://en.wikipedia.org/wiki/ANSI_escape_code#graphics - 'default' => '38;5;208', + 'default' => '0;38;5;208', 'num' => '1;38;5;38', 'const' => '1;38;5;208', 'str' => '1;38;5;113', @@ -40,31 +40,37 @@ class CliDumper extends AbstractDumper 'meta' => '38;5;170', 'key' => '38;5;113', 'index' => '38;5;38', - ); + ]; protected static $controlCharsRx = '/[\x00-\x1F\x7F]+/'; - protected static $controlCharsMap = array( + protected static $controlCharsMap = [ "\t" => '\t', "\n" => '\n', "\v" => '\v', "\f" => '\f', "\r" => '\r', "\033" => '\e', - ); + ]; protected $collapseNextHash = false; protected $expandNextHash = false; + private $displayOptions = [ + 'fileLinkFormat' => null, + ]; + + private $handlesHrefGracefully; + /** * {@inheritdoc} */ - public function __construct($output = null, $charset = null, $flags = 0) + public function __construct($output = null, string $charset = null, int $flags = 0) { parent::__construct($output, $charset, $flags); if ('\\' === \DIRECTORY_SEPARATOR && !$this->isWindowsTrueColor()) { // Use only the base 16 xterm colors when using ANSICON or standard Windows 10 CLI - $this->setStyles(array( + $this->setStyles([ 'default' => '31', 'num' => '1;34', 'const' => '1;31', @@ -74,8 +80,10 @@ public function __construct($output = null, $charset = null, $flags = 0) 'meta' => '35', 'key' => '32', 'index' => '34', - )); + ]); } + + $this->displayOptions['fileLinkFormat'] = ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format') ?: 'file://%f#L%l'; } /** @@ -108,6 +116,16 @@ public function setStyles(array $styles) $this->styles = $styles + $this->styles; } + /** + * Configures display options. + * + * @param array $displayOptions A map of display options to customize the behavior + */ + public function setDisplayOptions(array $displayOptions) + { + $this->displayOptions = $displayOptions + $this->displayOptions; + } + /** * {@inheritdoc} */ @@ -131,12 +149,12 @@ public function dumpScalar(Cursor $cursor, $type, $value) $style = 'num'; switch (true) { - case INF === $value: $value = 'INF'; break; - case -INF === $value: $value = '-INF'; break; + case \INF === $value: $value = 'INF'; break; + case -\INF === $value: $value = '-INF'; break; case is_nan($value): $value = 'NAN'; break; default: $value = (string) $value; - if (false === strpos($value, $this->decimalPoint)) { + if (!str_contains($value, $this->decimalPoint)) { $value .= $this->decimalPoint.'0'; } break; @@ -152,7 +170,7 @@ public function dumpScalar(Cursor $cursor, $type, $value) break; default: - $attr += array('value' => $this->utf8Encode($value)); + $attr += ['value' => $this->utf8Encode($value)]; $value = $this->utf8Encode($type); break; } @@ -177,10 +195,10 @@ public function dumpString(Cursor $cursor, $str, $bin, $cut) $this->line .= '""'; $this->endValue($cursor); } else { - $attr += array( + $attr += [ 'length' => 0 <= $cut ? mb_strlen($str, 'UTF-8') + $cut : 0, 'binary' => $bin, - ); + ]; $str = explode("\n", $str); if (isset($str[1]) && !isset($str[2]) && !isset($str[1][0])) { unset($str[1]); @@ -255,7 +273,12 @@ public function dumpString(Cursor $cursor, $str, $bin, $cut) */ public function enterHash(Cursor $cursor, $type, $class, $hasChild) { + if (null === $this->colors) { + $this->colors = $this->supportsColors(); + } + $this->dumpKey($cursor); + $attr = $cursor->attr; if ($this->collapseNextHash) { $cursor->skipChildren = true; @@ -264,17 +287,17 @@ public function enterHash(Cursor $cursor, $type, $class, $hasChild) $class = $this->utf8Encode($class); if (Cursor::HASH_OBJECT === $type) { - $prefix = $class && 'stdClass' !== $class ? $this->style('note', $class).' {' : '{'; + $prefix = $class && 'stdClass' !== $class ? $this->style('note', $class, $attr).(empty($attr['cut_hash']) ? ' {' : '') : '{'; } elseif (Cursor::HASH_RESOURCE === $type) { - $prefix = $this->style('note', $class.' resource').($hasChild ? ' {' : ' '); + $prefix = $this->style('note', $class.' resource', $attr).($hasChild ? ' {' : ' '); } else { $prefix = $class && !(self::DUMP_LIGHT_ARRAY & $this->flags) ? $this->style('note', 'array:'.$class).' [' : '['; } - if ($cursor->softRefCount || 0 < $cursor->softRefHandle) { - $prefix .= $this->style('ref', (Cursor::HASH_RESOURCE === $type ? '@' : '#').(0 < $cursor->softRefHandle ? $cursor->softRefHandle : $cursor->softRefTo), array('count' => $cursor->softRefCount)); + if (($cursor->softRefCount || 0 < $cursor->softRefHandle) && empty($attr['cut_hash'])) { + $prefix .= $this->style('ref', (Cursor::HASH_RESOURCE === $type ? '@' : '#').(0 < $cursor->softRefHandle ? $cursor->softRefHandle : $cursor->softRefTo), ['count' => $cursor->softRefCount]); } elseif ($cursor->hardRefTo && !$cursor->refIndex && $class) { - $prefix .= $this->style('ref', '&'.$cursor->hardRefTo, array('count' => $cursor->hardRefCount)); + $prefix .= $this->style('ref', '&'.$cursor->hardRefTo, ['count' => $cursor->hardRefCount]); } elseif (!$hasChild && Cursor::HASH_RESOURCE === $type) { $prefix = substr($prefix, 0, -1); } @@ -291,17 +314,19 @@ public function enterHash(Cursor $cursor, $type, $class, $hasChild) */ public function leaveHash(Cursor $cursor, $type, $class, $hasChild, $cut) { - $this->dumpEllipsis($cursor, $hasChild, $cut); - $this->line .= Cursor::HASH_OBJECT === $type ? '}' : (Cursor::HASH_RESOURCE !== $type ? ']' : ($hasChild ? '}' : '')); + if (empty($cursor->attr['cut_hash'])) { + $this->dumpEllipsis($cursor, $hasChild, $cut); + $this->line .= Cursor::HASH_OBJECT === $type ? '}' : (Cursor::HASH_RESOURCE !== $type ? ']' : ($hasChild ? '}' : '')); + } + $this->endValue($cursor); } /** * Dumps an ellipsis for cut children. * - * @param Cursor $cursor The Cursor position in the dump - * @param bool $hasChild When the dump of the hash has child item - * @param int $cut The number of items the hash has been cut by + * @param bool $hasChild When the dump of the hash has child item + * @param int $cut The number of items the hash has been cut by */ protected function dumpEllipsis(Cursor $cursor, $hasChild, $cut) { @@ -318,8 +343,6 @@ protected function dumpEllipsis(Cursor $cursor, $hasChild, $cut) /** * Dumps a key in a hash structure. - * - * @param Cursor $cursor The Cursor position in the dump */ protected function dumpKey(Cursor $cursor) { @@ -327,7 +350,7 @@ protected function dumpKey(Cursor $cursor) if ($cursor->hashKeyIsBinary) { $key = $this->utf8Encode($key); } - $attr = array('binary' => $cursor->hashKeyIsBinary); + $attr = ['binary' => $cursor->hashKeyIsBinary]; $bin = $cursor->hashKeyIsBinary ? 'b' : ''; $style = 'key'; switch ($cursor->hashType) { @@ -364,7 +387,7 @@ protected function dumpKey(Cursor $cursor) $style = 'meta'; if (isset($key[0][1])) { parse_str(substr($key[0], 1), $attr); - $attr += array('binary' => $cursor->hashKeyIsBinary); + $attr += ['binary' => $cursor->hashKeyIsBinary]; } break; case '*': @@ -386,16 +409,16 @@ protected function dumpKey(Cursor $cursor) } } - $this->line .= $bin.$this->style($style, $key[1], $attr).(isset($attr['separator']) ? $attr['separator'] : ': '); + $this->line .= $bin.$this->style($style, $key[1], $attr).($attr['separator'] ?? ': '); } else { // This case should not happen - $this->line .= '-'.$bin.'"'.$this->style('private', $key, array('class' => '')).'": '; + $this->line .= '-'.$bin.'"'.$this->style('private', $key, ['class' => '']).'": '; } break; } if ($cursor->hardRefTo) { - $this->line .= $this->style('ref', '&'.($cursor->hardRefCount ? $cursor->hardRefTo : ''), array('count' => $cursor->hardRefCount)).' '; + $this->line .= $this->style('ref', '&'.($cursor->hardRefCount ? $cursor->hardRefTo : ''), ['count' => $cursor->hardRefCount]).' '; } } } @@ -409,15 +432,20 @@ protected function dumpKey(Cursor $cursor) * * @return string The value with style decoration */ - protected function style($style, $value, $attr = array()) + protected function style($style, $value, $attr = []) { if (null === $this->colors) { $this->colors = $this->supportsColors(); } + if (null === $this->handlesHrefGracefully) { + $this->handlesHrefGracefully = 'JetBrains-JediTerm' !== getenv('TERMINAL_EMULATOR') + && (!getenv('KONSOLE_VERSION') || (int) getenv('KONSOLE_VERSION') > 201100); + } + if (isset($attr['ellipsis'], $attr['ellipsis-type'])) { $prefix = substr($value, 0, -$attr['ellipsis']); - if ('cli' === \PHP_SAPI && 'path' === $attr['ellipsis-type'] && isset($_SERVER[$pwd = '\\' === \DIRECTORY_SEPARATOR ? 'CD' : 'PWD']) && 0 === strpos($prefix, $_SERVER[$pwd])) { + if ('cli' === \PHP_SAPI && 'path' === $attr['ellipsis-type'] && isset($_SERVER[$pwd = '\\' === \DIRECTORY_SEPARATOR ? 'CD' : 'PWD']) && str_starts_with($prefix, $_SERVER[$pwd])) { $prefix = '.'.substr($prefix, \strlen($_SERVER[$pwd])); } if (!empty($attr['ellipsis-tail'])) { @@ -427,19 +455,19 @@ protected function style($style, $value, $attr = array()) $value = substr($value, -$attr['ellipsis']); } - return $this->style('default', $prefix).$this->style($style, $value); - } + $value = $this->style('default', $prefix).$this->style($style, $value); - $style = $this->styles[$style]; + goto href; + } $map = static::$controlCharsMap; $startCchr = $this->colors ? "\033[m\033[{$this->styles['default']}m" : ''; - $endCchr = $this->colors ? "\033[m\033[{$style}m" : ''; + $endCchr = $this->colors ? "\033[m\033[{$this->styles[$style]}m" : ''; $value = preg_replace_callback(static::$controlCharsRx, function ($c) use ($map, $startCchr, $endCchr) { $s = $startCchr; $c = $c[$i = 0]; do { - $s .= isset($map[$c[$i]]) ? $map[$c[$i]] : sprintf('\x%02X', \ord($c[$i])); + $s .= $map[$c[$i]] ?? sprintf('\x%02X', \ord($c[$i])); } while (isset($c[++$i])); return $s.$endCchr; @@ -449,15 +477,31 @@ protected function style($style, $value, $attr = array()) if ($cchrCount && "\033" === $value[0]) { $value = substr($value, \strlen($startCchr)); } else { - $value = "\033[{$style}m".$value; + $value = "\033[{$this->styles[$style]}m".$value; } - if ($cchrCount && $endCchr === substr($value, -\strlen($endCchr))) { + if ($cchrCount && str_ends_with($value, $endCchr)) { $value = substr($value, 0, -\strlen($endCchr)); } else { $value .= "\033[{$this->styles['default']}m"; } } + href: + if ($this->colors && $this->handlesHrefGracefully) { + if (isset($attr['file']) && $href = $this->getSourceLink($attr['file'], $attr['line'] ?? 0)) { + if ('note' === $style) { + $value .= "\033]8;;{$href}\033\\^\033]8;;\033\\"; + } else { + $attr['href'] = $href; + } + } + if (isset($attr['href'])) { + $value = "\033]8;;{$attr['href']}\033\\{$value}\033]8;;\033\\"; + } + } elseif ($attr['if_links'] ?? false) { + return ''; + } + return $value; } @@ -495,8 +539,8 @@ protected function supportsColors() } } - $h = stream_get_meta_data($this->outputStream) + array('wrapper_type' => null); - $h = 'Output' === $h['stream_type'] && 'PHP' === $h['wrapper_type'] ? fopen('php://stdout', 'wb') : $this->outputStream; + $h = stream_get_meta_data($this->outputStream) + ['wrapper_type' => null]; + $h = 'Output' === $h['stream_type'] && 'PHP' === $h['wrapper_type'] ? fopen('php://stdout', 'w') : $this->outputStream; return static::$defaultColors = $this->hasColorSupport($h); } @@ -514,6 +558,10 @@ protected function dumpLine($depth, $endOfValue = false) protected function endValue(Cursor $cursor) { + if (-1 === $cursor->hashType) { + return; + } + if (Stub::ARRAY_INDEXED === $cursor->hashType || Stub::ARRAY_ASSOC === $cursor->hashType) { if (self::DUMP_TRAILING_COMMA & $this->flags && 0 < $cursor->depth) { $this->line .= ','; @@ -532,15 +580,18 @@ protected function endValue(Cursor $cursor) * https://github.com/composer/xdebug-handler * * @param mixed $stream A CLI output stream - * - * @return bool */ - private function hasColorSupport($stream) + private function hasColorSupport($stream): bool { if (!\is_resource($stream) || 'stream' !== get_resource_type($stream)) { return false; } + // Follow https://no-color.org/ + if (isset($_SERVER['NO_COLOR']) || false !== getenv('NO_COLOR')) { + return false; + } + if ('Hyper' === getenv('TERM_PROGRAM')) { return true; } @@ -572,10 +623,8 @@ private function hasColorSupport($stream) * Note that this does not check an output stream, but relies on environment * variables from known implementations, or a PHP and Windows version that * supports true color. - * - * @return bool */ - private function isWindowsTrueColor() + private function isWindowsTrueColor(): bool { $result = 183 <= getenv('ANSICON_VER') || 'ON' === getenv('ConEmuANSI') @@ -594,4 +643,13 @@ private function isWindowsTrueColor() return $result; } + + private function getSourceLink(string $file, int $line) + { + if ($fmt = $this->displayOptions['fileLinkFormat']) { + return \is_string($fmt) ? strtr($fmt, ['%f' => $file, '%l' => $line]) : ($fmt->format($file, $line) ?: 'file://'.$file.'#L'.$line); + } + + return false; + } } diff --git a/app/vendor/symfony/var-dumper/Dumper/ContextProvider/CliContextProvider.php b/app/vendor/symfony/var-dumper/Dumper/ContextProvider/CliContextProvider.php new file mode 100644 index 000000000..38f878971 --- /dev/null +++ b/app/vendor/symfony/var-dumper/Dumper/ContextProvider/CliContextProvider.php @@ -0,0 +1,32 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Dumper\ContextProvider; + +/** + * Tries to provide context on CLI. + * + * @author Maxime Steinhausser + */ +final class CliContextProvider implements ContextProviderInterface +{ + public function getContext(): ?array + { + if ('cli' !== \PHP_SAPI) { + return null; + } + + return [ + 'command_line' => $commandLine = implode(' ', $_SERVER['argv'] ?? []), + 'identifier' => hash('crc32b', $commandLine.$_SERVER['REQUEST_TIME_FLOAT']), + ]; + } +} diff --git a/app/vendor/symfony/var-dumper/Dumper/ContextProvider/ContextProviderInterface.php b/app/vendor/symfony/var-dumper/Dumper/ContextProvider/ContextProviderInterface.php new file mode 100644 index 000000000..38ef3b0f1 --- /dev/null +++ b/app/vendor/symfony/var-dumper/Dumper/ContextProvider/ContextProviderInterface.php @@ -0,0 +1,25 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Dumper\ContextProvider; + +/** + * Interface to provide contextual data about dump data clones sent to a server. + * + * @author Maxime Steinhausser + */ +interface ContextProviderInterface +{ + /** + * @return array|null Context data or null if unable to provide any context + */ + public function getContext(): ?array; +} diff --git a/app/vendor/symfony/var-dumper/Dumper/ContextProvider/RequestContextProvider.php b/app/vendor/symfony/var-dumper/Dumper/ContextProvider/RequestContextProvider.php new file mode 100644 index 000000000..3684a4753 --- /dev/null +++ b/app/vendor/symfony/var-dumper/Dumper/ContextProvider/RequestContextProvider.php @@ -0,0 +1,51 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Dumper\ContextProvider; + +use Symfony\Component\HttpFoundation\RequestStack; +use Symfony\Component\VarDumper\Caster\ReflectionCaster; +use Symfony\Component\VarDumper\Cloner\VarCloner; + +/** + * Tries to provide context from a request. + * + * @author Maxime Steinhausser + */ +final class RequestContextProvider implements ContextProviderInterface +{ + private $requestStack; + private $cloner; + + public function __construct(RequestStack $requestStack) + { + $this->requestStack = $requestStack; + $this->cloner = new VarCloner(); + $this->cloner->setMaxItems(0); + $this->cloner->addCasters(ReflectionCaster::UNSET_CLOSURE_FILE_INFO); + } + + public function getContext(): ?array + { + if (null === $request = $this->requestStack->getCurrentRequest()) { + return null; + } + + $controller = $request->attributes->get('_controller'); + + return [ + 'uri' => $request->getUri(), + 'method' => $request->getMethod(), + 'controller' => $controller ? $this->cloner->cloneVar($controller) : $controller, + 'identifier' => spl_object_hash($request), + ]; + } +} diff --git a/app/vendor/symfony/var-dumper/Dumper/ContextProvider/SourceContextProvider.php b/app/vendor/symfony/var-dumper/Dumper/ContextProvider/SourceContextProvider.php new file mode 100644 index 000000000..2e2c81816 --- /dev/null +++ b/app/vendor/symfony/var-dumper/Dumper/ContextProvider/SourceContextProvider.php @@ -0,0 +1,126 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Dumper\ContextProvider; + +use Symfony\Component\HttpKernel\Debug\FileLinkFormatter; +use Symfony\Component\VarDumper\Cloner\VarCloner; +use Symfony\Component\VarDumper\Dumper\HtmlDumper; +use Symfony\Component\VarDumper\VarDumper; +use Twig\Template; + +/** + * Tries to provide context from sources (class name, file, line, code excerpt, ...). + * + * @author Nicolas Grekas + * @author Maxime Steinhausser + */ +final class SourceContextProvider implements ContextProviderInterface +{ + private $limit; + private $charset; + private $projectDir; + private $fileLinkFormatter; + + public function __construct(string $charset = null, string $projectDir = null, FileLinkFormatter $fileLinkFormatter = null, int $limit = 9) + { + $this->charset = $charset; + $this->projectDir = $projectDir; + $this->fileLinkFormatter = $fileLinkFormatter; + $this->limit = $limit; + } + + public function getContext(): ?array + { + $trace = debug_backtrace(\DEBUG_BACKTRACE_PROVIDE_OBJECT | \DEBUG_BACKTRACE_IGNORE_ARGS, $this->limit); + + $file = $trace[1]['file']; + $line = $trace[1]['line']; + $name = false; + $fileExcerpt = false; + + for ($i = 2; $i < $this->limit; ++$i) { + if (isset($trace[$i]['class'], $trace[$i]['function']) + && 'dump' === $trace[$i]['function'] + && VarDumper::class === $trace[$i]['class'] + ) { + $file = $trace[$i]['file'] ?? $file; + $line = $trace[$i]['line'] ?? $line; + + while (++$i < $this->limit) { + if (isset($trace[$i]['function'], $trace[$i]['file']) && empty($trace[$i]['class']) && !str_starts_with($trace[$i]['function'], 'call_user_func')) { + $file = $trace[$i]['file']; + $line = $trace[$i]['line']; + + break; + } elseif (isset($trace[$i]['object']) && $trace[$i]['object'] instanceof Template) { + $template = $trace[$i]['object']; + $name = $template->getTemplateName(); + $src = method_exists($template, 'getSourceContext') ? $template->getSourceContext()->getCode() : (method_exists($template, 'getSource') ? $template->getSource() : false); + $info = $template->getDebugInfo(); + if (isset($info[$trace[$i - 1]['line']])) { + $line = $info[$trace[$i - 1]['line']]; + $file = method_exists($template, 'getSourceContext') ? $template->getSourceContext()->getPath() : null; + + if ($src) { + $src = explode("\n", $src); + $fileExcerpt = []; + + for ($i = max($line - 3, 1), $max = min($line + 3, \count($src)); $i <= $max; ++$i) { + $fileExcerpt[] = ''.$this->htmlEncode($src[$i - 1]).''; + } + + $fileExcerpt = '
      '.implode("\n", $fileExcerpt).'
    '; + } + } + break; + } + } + break; + } + } + + if (false === $name) { + $name = str_replace('\\', '/', $file); + $name = substr($name, strrpos($name, '/') + 1); + } + + $context = ['name' => $name, 'file' => $file, 'line' => $line]; + $context['file_excerpt'] = $fileExcerpt; + + if (null !== $this->projectDir) { + $context['project_dir'] = $this->projectDir; + if (str_starts_with($file, $this->projectDir)) { + $context['file_relative'] = ltrim(substr($file, \strlen($this->projectDir)), \DIRECTORY_SEPARATOR); + } + } + + if ($this->fileLinkFormatter && $fileLink = $this->fileLinkFormatter->format($context['file'], $context['line'])) { + $context['file_link'] = $fileLink; + } + + return $context; + } + + private function htmlEncode(string $s): string + { + $html = ''; + + $dumper = new HtmlDumper(function ($line) use (&$html) { $html .= $line; }, $this->charset); + $dumper->setDumpHeader(''); + $dumper->setDumpBoundaries('', ''); + + $cloner = new VarCloner(); + $dumper->dump($cloner->cloneVar($s)); + + return substr(strip_tags($html), 1, -1); + } +} diff --git a/app/vendor/symfony/var-dumper/Dumper/ContextualizedDumper.php b/app/vendor/symfony/var-dumper/Dumper/ContextualizedDumper.php new file mode 100644 index 000000000..76384176e --- /dev/null +++ b/app/vendor/symfony/var-dumper/Dumper/ContextualizedDumper.php @@ -0,0 +1,43 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Dumper; + +use Symfony\Component\VarDumper\Cloner\Data; +use Symfony\Component\VarDumper\Dumper\ContextProvider\ContextProviderInterface; + +/** + * @author Kévin Thérage + */ +class ContextualizedDumper implements DataDumperInterface +{ + private $wrappedDumper; + private $contextProviders; + + /** + * @param ContextProviderInterface[] $contextProviders + */ + public function __construct(DataDumperInterface $wrappedDumper, array $contextProviders) + { + $this->wrappedDumper = $wrappedDumper; + $this->contextProviders = $contextProviders; + } + + public function dump(Data $data) + { + $context = []; + foreach ($this->contextProviders as $contextProvider) { + $context[\get_class($contextProvider)] = $contextProvider->getContext(); + } + + $this->wrappedDumper->dump($data->withContext($context)); + } +} diff --git a/app/vendor/symfony/var-dumper/Dumper/HtmlDumper.php b/app/vendor/symfony/var-dumper/Dumper/HtmlDumper.php index d498e12f8..8409a0c74 100644 --- a/app/vendor/symfony/var-dumper/Dumper/HtmlDumper.php +++ b/app/vendor/symfony/var-dumper/Dumper/HtmlDumper.php @@ -23,6 +23,41 @@ class HtmlDumper extends CliDumper { public static $defaultOutput = 'php://output'; + protected static $themes = [ + 'dark' => [ + 'default' => 'background-color:#18171B; color:#FF8400; line-height:1.2em; font:12px Menlo, Monaco, Consolas, monospace; word-wrap: break-word; white-space: pre-wrap; position:relative; z-index:99999; word-break: break-all', + 'num' => 'font-weight:bold; color:#1299DA', + 'const' => 'font-weight:bold', + 'str' => 'font-weight:bold; color:#56DB3A', + 'note' => 'color:#1299DA', + 'ref' => 'color:#A0A0A0', + 'public' => 'color:#FFFFFF', + 'protected' => 'color:#FFFFFF', + 'private' => 'color:#FFFFFF', + 'meta' => 'color:#B729D9', + 'key' => 'color:#56DB3A', + 'index' => 'color:#1299DA', + 'ellipsis' => 'color:#FF8400', + 'ns' => 'user-select:none;', + ], + 'light' => [ + 'default' => 'background:none; color:#CC7832; line-height:1.2em; font:12px Menlo, Monaco, Consolas, monospace; word-wrap: break-word; white-space: pre-wrap; position:relative; z-index:99999; word-break: break-all', + 'num' => 'font-weight:bold; color:#1299DA', + 'const' => 'font-weight:bold', + 'str' => 'font-weight:bold; color:#629755;', + 'note' => 'color:#6897BB', + 'ref' => 'color:#6E6E6E', + 'public' => 'color:#262626', + 'protected' => 'color:#262626', + 'private' => 'color:#262626', + 'meta' => 'color:#B729D9', + 'key' => 'color:#789339', + 'index' => 'color:#1299DA', + 'ellipsis' => 'color:#CC7832', + 'ns' => 'user-select:none;', + ], + ]; + protected $dumpHeader; protected $dumpPrefix = '
    ';
         protected $dumpSuffix = '
    '; @@ -30,37 +65,24 @@ class HtmlDumper extends CliDumper protected $colors = true; protected $headerIsDumped = false; protected $lastDepth = -1; - protected $styles = array( - 'default' => 'background-color:#18171B; color:#FF8400; line-height:1.2em; font:12px Menlo, Monaco, Consolas, monospace; word-wrap: break-word; white-space: pre-wrap; position:relative; z-index:99999; word-break: break-all', - 'num' => 'font-weight:bold; color:#1299DA', - 'const' => 'font-weight:bold', - 'str' => 'font-weight:bold; color:#56DB3A', - 'note' => 'color:#1299DA', - 'ref' => 'color:#A0A0A0', - 'public' => 'color:#FFFFFF', - 'protected' => 'color:#FFFFFF', - 'private' => 'color:#FFFFFF', - 'meta' => 'color:#B729D9', - 'key' => 'color:#56DB3A', - 'index' => 'color:#1299DA', - 'ellipsis' => 'color:#FF8400', - ); - - private $displayOptions = array( + protected $styles; + + private $displayOptions = [ 'maxDepth' => 1, 'maxStringLength' => 160, 'fileLinkFormat' => null, - ); - private $extraDisplayOptions = array(); + ]; + private $extraDisplayOptions = []; /** * {@inheritdoc} */ - public function __construct($output = null, $charset = null, $flags = 0) + public function __construct($output = null, string $charset = null, int $flags = 0) { AbstractDumper::__construct($output, $charset, $flags); $this->dumpId = 'sf-dump-'.mt_rand(); $this->displayOptions['fileLinkFormat'] = ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format'); + $this->styles = static::$themes['dark'] ?? self::$themes['dark']; } /** @@ -72,6 +94,15 @@ public function setStyles(array $styles) $this->styles = $styles + $this->styles; } + public function setTheme(string $themeName) + { + if (!isset(static::$themes[$themeName])) { + throw new \InvalidArgumentException(sprintf('Theme "%s" does not exist in class "%s".', $themeName, static::class)); + } + + $this->setStyles(static::$themes[$themeName]); + } + /** * Configures display options. * @@ -108,7 +139,7 @@ public function setDumpBoundaries($prefix, $suffix) /** * {@inheritdoc} */ - public function dump(Data $data, $output = null, array $extraDisplayOptions = array()) + public function dump(Data $data, $output = null, array $extraDisplayOptions = []) { $this->extraDisplayOptions = $extraDisplayOptions; $result = parent::dump($data, $output); @@ -122,13 +153,13 @@ public function dump(Data $data, $output = null, array $extraDisplayOptions = ar */ protected function getDumpHeader() { - $this->headerIsDumped = null !== $this->outputStream ? $this->outputStream : $this->lineDumper; + $this->headerIsDumped = $this->outputStream ?? $this->lineDumper; if (null !== $this->dumpHeader) { return $this->dumpHeader; } - $line = str_replace('{$options}', json_encode($this->displayOptions, JSON_FORCE_OBJECT), <<<'EOHTML' + $line = str_replace('{$options}', json_encode($this->displayOptions, \JSON_FORCE_OBJECT), <<<'EOHTML'