diff options
author | Remi Collet <remi@remirepo.net> | 2019-11-05 09:28:58 +0100 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2019-11-05 09:28:58 +0100 |
commit | 243966ba67caaeb492e4a372b1e60b9a62b955e6 (patch) | |
tree | f3b9aa9814b9d1492b53431c13003dd1c61b8eb5 | |
parent | 49d901f7083ac527f007e93b4520f42327881bcd (diff) |
- update to 3.4.31
- raise dependency on twig 1.41
- raise dependency on egulias/email-validator 2.1.10
- raise dependency on doctrine/annotations 1.7
* Sat Sep 14 2019 Shawn Iwinski <shawn.iwinski@gmail.com> - 3.4.30-2
- Update autoloader generator to include self PSR-0, PSR-4, files, and classmap
-rw-r--r-- | composer.json | 7 | ||||
-rwxr-xr-x | php-symfony3-generate-autoloaders.php | 112 | ||||
-rw-r--r-- | php-symfony3.spec | 39 | ||||
-rw-r--r-- | src/Symfony/Bridge/Doctrine/composer.json | 1 | ||||
-rw-r--r-- | src/Symfony/Bridge/ProxyManager/composer.json | 1 | ||||
-rw-r--r-- | src/Symfony/Bridge/Twig/composer.json | 7 | ||||
-rw-r--r-- | src/Symfony/Bundle/FrameworkBundle/composer.json | 15 | ||||
-rw-r--r-- | src/Symfony/Bundle/SecurityBundle/composer.json | 2 | ||||
-rw-r--r-- | src/Symfony/Bundle/TwigBundle/composer.json | 5 | ||||
-rw-r--r-- | src/Symfony/Component/PropertyInfo/composer.json | 2 | ||||
-rw-r--r-- | src/Symfony/Component/Validator/composer.json | 5 | ||||
-rw-r--r-- | src/Symfony/Component/Workflow/composer.json | 2 |
12 files changed, 154 insertions, 44 deletions
diff --git a/composer.json b/composer.json index 143f73d..5799e0d 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ "ext-xml": "*", "doctrine/common": "~2.4", "fig/link-util": "^1.0", - "twig/twig": "^1.40|^2.9", + "twig/twig": "^1.41|^2.10", "psr/cache": "~1.0", "psr/container": "^1.0", "psr/link": "^1.0", @@ -98,7 +98,7 @@ "ocramius/proxy-manager": "~0.4|~1.0|~2.0", "predis/predis": "~1.0", "egulias/email-validator": "~1.2,>=1.2.8|~2.0", - "symfony/phpunit-bridge": "~3.4|~4.0|~5.0", + "symfony/phpunit-bridge": "^3.4.31|^4.3.4|~5.0", "symfony/security-acl": "~2.8|~3.0", "phpdocumentor/reflection-docblock": "^3.0|^4.0" }, @@ -123,7 +123,8 @@ "Symfony\\Component\\": "src/Symfony/Component/" }, "classmap": [ - "src/Symfony/Component/Intl/Resources/stubs" + "src/Symfony/Component/Intl/Resources/stubs", + "src/Symfony/Bridge/ProxyManager/Legacy/ProxiedMethodReturnExpression.php" ], "exclude-from-classmap": [ "**/Tests/" diff --git a/php-symfony3-generate-autoloaders.php b/php-symfony3-generate-autoloaders.php index 0508257..90d2c50 100755 --- a/php-symfony3-generate-autoloaders.php +++ b/php-symfony3-generate-autoloaders.php @@ -10,12 +10,18 @@ $autoloader->register(); use Symfony\Component\Finder\Finder; use Symfony\Component\Finder\SplFileInfo; +use Symfony\Component\Process\Exception\ProcessFailedException; +use Symfony\Component\Process\Process; $finder = new Finder(); -$finder->in(SYMFONY_SOURCE_DIR)->name('composer.json')->sortByName(); +$finder + ->in(SYMFONY_SOURCE_DIR) + ->notPath('Tests') + ->name('composer.json') + ->sortByName(); foreach ($finder as $composerFile) { - fprintf(STDERR, "\tgenerate %s\n", $composerFile); + fprintf(STDERR, 'generating autoloader from %s'.PHP_EOL, $composerFile); $autoloadGenerator = new AutoloadGenerator($composerFile); echo $autoloadGenerator->getFilename().PHP_EOL; echo $autoloadGenerator->getDevFilename().PHP_EOL; @@ -65,7 +71,7 @@ final class AutoloadGenerator { ], 'egulias/email-validator' => [ 'prefix' => 'FEDORA_SYMFONY3_PHP_DIR', - 'path' => 'Egulias/EmailValidator/autoload.php', + 'path' => 'Egulias/EmailValidator2/autoload.php', ], 'fig/link-util' => [ 'prefix' => 'FEDORA_SYMFONY3_PHP_DIR', @@ -366,11 +372,17 @@ final class AutoloadGenerator { private $devFilename = null; public function __construct(SplFileInfo $composerFile) { + $composerPath = $composerFile->getPath(); $composerJson = static::composerJson($composerFile); // autoload.php $content = static::content( - $composerJson, + $composerPath, + $composerJson['name'], + isset($composerJson['autoload']['psr-0']) ? $composerJson['autoload']['psr-0'] : [], + isset($composerJson['autoload']['psr-4']) ? $composerJson['autoload']['psr-4'] : [], + isset($composerJson['autoload']['files']) ? $composerJson['autoload']['files'] : [], + isset($composerJson['autoload']['classmap']) ? $composerJson['autoload']['classmap'] : [], static::dependencyAutoloaders($composerJson, 'require'), static::dependencyAutoloaders($composerJson, 'suggest') ); @@ -384,7 +396,12 @@ final class AutoloadGenerator { // autoload-dev.php $content = static::content( - $composerJson, + $composerPath, + $composerJson['name'], + [], + [], + [], + [], static::dependencyAutoloaders($composerJson, 'require-dev'), [], true @@ -465,8 +482,18 @@ final class AutoloadGenerator { : sprintf("%s.'/%s'", $prefix, $path); } - public function content($composerJson, array $dependencyAutoloadersRequired, array $dependencyAutoloadersOptional = [], $dev = false) { - $pkg = explode('/', $composerJson['name'])[1]; + public function content( + $path, + $name, + array $psr0, + array $psr4, + array $files, + array $classmap, + array $dependencyAutoloadersRequired, + array $dependencyAutoloadersOptional, + $dev = false + ) { + $pkg = explode('/', $name)[1]; $content = <<<AUTOLOAD <?php @@ -502,22 +529,89 @@ AUTOLOAD; } } + // PSR-0 + if (!empty($psr0)) { + $content .= PHP_EOL.'// Self PSR-0'.PHP_EOL; + + foreach ($psr0 as $namespace => $directory) { + $content .= sprintf( + "\\Fedora\\Autoloader\\Autoload::addPsr0('%s', %s, true);".PHP_EOL, + str_replace('\\', '\\\\', $namespace), + $directory ? "'$directory'" : '__DIR__' + ); + } + } + + // PSR-4 + if (!empty($psr4)) { + $content .= PHP_EOL.'// Self PSR-4'.PHP_EOL; + + foreach ($psr4 as $namespace => $directory) { + $content .= sprintf( + "\\Fedora\\Autoloader\\Autoload::addPsr4('%s', %s, true);".PHP_EOL, + str_replace('\\', '\\\\', $namespace), + $directory ? "'$directory'" : '__DIR__' + ); + } + } + + // Files + if (!empty($files)) { + $content .= PHP_EOL.'// Self files'.PHP_EOL; + + foreach ($files as $file) { + $content .= sprintf( + "require_once __DIR__.'/$file';".PHP_EOL, + $file + ); + } + } + + // Classmap + if (!empty($classmap)) { + $cmd = array_merge( + [ + 'phpab', + '--template', 'fedora', + '--output', 'autoload.classmap.php', + ], + $classmap + ); + + $process = new Process($cmd, $path); + $process->run(); + + if (!$process->isSuccessful()) { + throw new ProcessFailedException($process); + } + + $content .= <<<SELF_CLASSMAP + +// Self classmap +require_once __DIR__.'/autoload.classmap.php'; + +SELF_CLASSMAP; + } + + // Required dependencies if (!empty($dependencyAutoloadersRequired)) { $dependencyAutoloadersRequiredString = implode(",\n ", $dependencyAutoloadersRequired); $content .= <<<DEPENDENCY_AUTOLOADERS_REQUIRED - +// Required dependencies \Fedora\Autoloader\Dependencies::required([ $dependencyAutoloadersRequiredString ]); + DEPENDENCY_AUTOLOADERS_REQUIRED; } + // Optional dependencies if (!empty($dependencyAutoloadersOptional)) { $dependencyAutoloadersOptionalString = implode(",\n ", $dependencyAutoloadersOptional); $content .= <<<DEPENDENCY_AUTOLOADERS_REQUIRED - +// Optional dependencies \Fedora\Autoloader\Dependencies::optional([ $dependencyAutoloadersOptionalString ]); diff --git a/php-symfony3.spec b/php-symfony3.spec index f88b8d6..100b42a 100644 --- a/php-symfony3.spec +++ b/php-symfony3.spec @@ -13,8 +13,8 @@ %global github_owner symfony %global github_name symfony -%global github_version 3.4.29 -%global github_commit 4c9b6d7d898457ae2189efdfaca58712269fc994 +%global github_version 3.4.31 +%global github_commit 944e04808117477f46f804133d17913b77cf63d3 %global composer_vendor symfony %global composer_project symfony @@ -25,7 +25,7 @@ # NOTE: Min and max versions added to restrict to single major version %global cache_integration_tests_min_ver 0 %global cache_integration_tests_max_ver 1 -# "doctrine/annotations": "~1.0" +# "doctrine/annotations": "~1.7" # src/Symfony/Bundle/FrameworkBundle/composer.json # src/Symfony/Bundle/TwigBundle/composer.json # src/Symfony/Component/PropertyInfo/composer.json @@ -53,10 +53,9 @@ # "doctrine/orm": "~2.4,>=2.4.5" %global doctrine_orm_min_ver 2.4.5 %global doctrine_orm_max_ver 3.0 -# "egulias/email-validator": "~1.2,>=1.2.8|~2.0" -# NOTE: Min version not 3.0 to restrict to single major version -%global email_validator_min_ver 1.2.8 -%global email_validator_max_ver 2.0 +# "egulias/email-validator": "^2.1.10" +%global email_validator_min_ver 2.1.10 +%global email_validator_max_ver 3.0 # "fig/link-util": "^1.0" %global fig_link_util_min_ver 1.0 %global fig_link_util_max_ver 2.0 @@ -96,9 +95,9 @@ # NOTE: Min version not 4.0 to restrict to single major version %global symfony_security_acl_min_ver 2.8 %global symfony_security_acl_max_ver 3.0 -# "twig/twig": "^1.40|^2.9" +# "twig/twig": "^1.41|^2.10" # NOTE: Multiple major versions handled in autoloaders -%global twig_min_ver 1.40 +%global twig_min_ver 1.41 %global twig_max_ver 3.0 # Build using "--with tests" to enable tests @@ -113,7 +112,7 @@ Name: php-%{composer_project}3 Version: %{github_version} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Symfony PHP framework (version 3) # MIT and CC-BY-SA: @@ -203,7 +202,7 @@ BuildRequires: php-tokenizer BuildRequires: php-xml BuildRequires: php-xmlreader ## Autoloader -BuildRequires: php-composer(fedora/autoloader) +BuildRequires: php-fedora-autoloader-devel # Conflicts BuildConflicts: php-composer(phpdocumentor/type-resolver) < 0.3.0 @@ -497,6 +496,7 @@ Summary: Symfony Framework Bundle (version 3) Requires: php-composer(%{composer_vendor}/cache) = %{version} Requires: php-composer(%{composer_vendor}/class-loader) = %{version} Requires: php-composer(%{composer_vendor}/config) = %{version} +Requires: php-composer(%{composer_vendor}/debug) = %{version} Requires: php-composer(%{composer_vendor}/dependency-injection) = %{version} Requires: php-composer(%{composer_vendor}/event-dispatcher) = %{version} Requires: php-composer(%{composer_vendor}/filesystem) = %{version} @@ -583,6 +583,7 @@ Summary: Symfony Twig Bundle (version 3) # composer.json Requires: php-composer(%{composer_vendor}/config) = %{version} +Requires: php-composer(%{composer_vendor}/debug) = %{version} Requires: php-composer(%{composer_vendor}/http-foundation) = %{version} Requires: php-composer(%{composer_vendor}/http-kernel) = %{version} Requires: php-composer(%{composer_vendor}/twig-bridge) = %{version} @@ -1865,10 +1866,6 @@ if (!defined('FEDORA_SYMFONY3_DIR')) { define('FEDORA_SYMFONY3_DIR', __DIR__); } -\Fedora\Autoloader\Autoload::addPsr4('Symfony\\Bridge\\', FEDORA_SYMFONY3_DIR.'/Bridge', true); -\Fedora\Autoloader\Autoload::addPsr4('Symfony\\Bundle\\', FEDORA_SYMFONY3_DIR.'/Bundle', true); -\Fedora\Autoloader\Autoload::addPsr4('Symfony\\Component\\', FEDORA_SYMFONY3_DIR.'/Component', true); - \Fedora\Autoloader\Dependencies::required([ '%{phpdir}/Composer/autoload.php', ]); @@ -2810,6 +2807,18 @@ exit $RET # ############################################################################## %changelog +* Tue Aug 27 2019 Remi Collet <remi@remirepo.net> - 3.4.31-1 +- update to 3.4.31 +- raise dependency on twig 1.41 +- raise dependency on egulias/email-validator 2.1.10 +- raise dependency on doctrine/annotations 1.7 + +* Sat Sep 14 2019 Shawn Iwinski <shawn.iwinski@gmail.com> - 3.4.30-2 +- Update autoloader generator to include self PSR-0, PSR-4, files, and classmap + +* Tue Aug 20 2019 Remi Collet <remi@remirepo.net> - 3.4.30-1 +- update to 3.4.30 + * Thu Jun 27 2019 Remi Collet <remi@remirepo.net> - 3.4.29-1 - update to 3.4.29 diff --git a/src/Symfony/Bridge/Doctrine/composer.json b/src/Symfony/Bridge/Doctrine/composer.json index 420535b..1aa2315 100644 --- a/src/Symfony/Bridge/Doctrine/composer.json +++ b/src/Symfony/Bridge/Doctrine/composer.json @@ -22,6 +22,7 @@ "symfony/polyfill-mbstring": "~1.0" }, "require-dev": { + "doctrine/annotations": "~1.7", "symfony/stopwatch": "~2.8|~3.0|~4.0", "symfony/dependency-injection": "~3.4|~4.0", "symfony/form": "^3.3.10|~4.0", diff --git a/src/Symfony/Bridge/ProxyManager/composer.json b/src/Symfony/Bridge/ProxyManager/composer.json index 7e34cd9..4adc5c0 100644 --- a/src/Symfony/Bridge/ProxyManager/composer.json +++ b/src/Symfony/Bridge/ProxyManager/composer.json @@ -25,6 +25,7 @@ }, "autoload": { "psr-4": { "Symfony\\Bridge\\ProxyManager\\": "" }, + "classmap": [ "Legacy/ProxiedMethodReturnExpression.php" ], "exclude-from-classmap": [ "/Tests/" ] diff --git a/src/Symfony/Bridge/Twig/composer.json b/src/Symfony/Bridge/Twig/composer.json index 071b25b..f4fb1c9 100644 --- a/src/Symfony/Bridge/Twig/composer.json +++ b/src/Symfony/Bridge/Twig/composer.json @@ -17,13 +17,14 @@ ], "require": { "php": "^5.5.9|>=7.0.8", - "twig/twig": "^1.40|^2.9" + "twig/twig": "^1.41|^2.10" }, "require-dev": { + "fig/link-util": "^1.0", "symfony/asset": "~2.8|~3.0|~4.0", "symfony/dependency-injection": "~2.8|~3.0|~4.0", "symfony/finder": "~2.8|~3.0|~4.0", - "symfony/form": "^3.4.23|^4.2.4", + "symfony/form": "^3.4.31|^4.3.4", "symfony/http-foundation": "^3.3.11|~4.0", "symfony/http-kernel": "~3.2|~4.0", "symfony/polyfill-intl-icu": "~1.0", @@ -41,7 +42,7 @@ "symfony/workflow": "~3.3|~4.0" }, "conflict": { - "symfony/form": "<3.4.13|>=4.0,<4.0.13|>=4.1,<4.1.2", + "symfony/form": "<3.4.31|>=4.0,<4.3.4", "symfony/console": "<3.4" }, "suggest": { diff --git a/src/Symfony/Bundle/FrameworkBundle/composer.json b/src/Symfony/Bundle/FrameworkBundle/composer.json index 78d7ae1..dae941c 100644 --- a/src/Symfony/Bundle/FrameworkBundle/composer.json +++ b/src/Symfony/Bundle/FrameworkBundle/composer.json @@ -18,13 +18,14 @@ "require": { "php": "^5.5.9|>=7.0.8", "ext-xml": "*", - "symfony/cache": "~3.4|~4.0", + "symfony/cache": "~3.4.31|^4.3.4", "symfony/class-loader": "~3.2", "symfony/dependency-injection": "^3.4.24|^4.2.5", - "symfony/config": "~3.4|~4.0", + "symfony/config": "^3.4.31|^4.3.4", + "symfony/debug": "~2.8|~3.0|~4.0", "symfony/event-dispatcher": "~3.4|~4.0", - "symfony/http-foundation": "^3.3.11|~4.0", - "symfony/http-kernel": "~3.4|~4.0", + "symfony/http-foundation": "^3.4.13|~4.3", + "symfony/http-kernel": "^3.4.31|^4.3.4", "symfony/polyfill-mbstring": "~1.0", "symfony/filesystem": "~2.8|~3.0|~4.0", "symfony/finder": "~2.8|~3.0|~4.0", @@ -35,11 +36,11 @@ "fig/link-util": "^1.0", "symfony/asset": "~3.3|~4.0", "symfony/browser-kit": "~2.8|~3.0|~4.0", - "symfony/console": "~3.4|~4.0", + "symfony/console": "~3.4.31|^4.3.4", "symfony/css-selector": "~2.8|~3.0|~4.0", "symfony/dom-crawler": "~2.8|~3.0|~4.0", "symfony/polyfill-intl-icu": "~1.0", - "symfony/form": "^3.4.22|~4.1.11|^4.2.3", + "symfony/form": "^3.4.31|^4.3.4", "symfony/expression-language": "~2.8|~3.0|~4.0", "symfony/process": "~2.8|~3.0|~4.0", "symfony/security-core": "~3.2|~4.0", @@ -55,7 +56,7 @@ "symfony/property-info": "~3.3|~4.0", "symfony/lock": "~3.4|~4.0", "symfony/web-link": "~3.3|~4.0", - "doctrine/annotations": "~1.0", + "doctrine/annotations": "~1.7", "phpdocumentor/reflection-docblock": "^3.0|^4.0", "twig/twig": "~1.34|~2.4" }, diff --git a/src/Symfony/Bundle/SecurityBundle/composer.json b/src/Symfony/Bundle/SecurityBundle/composer.json index 6faf933..1f0e56e 100644 --- a/src/Symfony/Bundle/SecurityBundle/composer.json +++ b/src/Symfony/Bundle/SecurityBundle/composer.json @@ -44,7 +44,7 @@ "symfony/yaml": "~3.4|~4.0", "symfony/expression-language": "~2.8|~3.0|~4.0", "doctrine/doctrine-bundle": "~1.5", - "twig/twig": "~1.34|~2.4" + "twig/twig": "~1.41|~2.10" }, "conflict": { "symfony/var-dumper": "<3.3", diff --git a/src/Symfony/Bundle/TwigBundle/composer.json b/src/Symfony/Bundle/TwigBundle/composer.json index 5d27f06..f48e3bc 100644 --- a/src/Symfony/Bundle/TwigBundle/composer.json +++ b/src/Symfony/Bundle/TwigBundle/composer.json @@ -18,11 +18,12 @@ "require": { "php": "^5.5.9|>=7.0.8", "symfony/config": "~3.2|~4.0", + "symfony/debug": "~2.8|~3.0|~4.0", "symfony/twig-bridge": "^3.4.3|^4.0.3", "symfony/http-foundation": "~2.8|~3.0|~4.0", "symfony/http-kernel": "^3.3|~4.0", "symfony/polyfill-ctype": "~1.8", - "twig/twig": "~1.40|~2.9" + "twig/twig": "~1.41|~2.10" }, "require-dev": { "symfony/asset": "~2.8|~3.0|~4.0", @@ -36,7 +37,7 @@ "symfony/yaml": "~2.8|~3.0|~4.0", "symfony/framework-bundle": "^3.3.11|~4.0", "symfony/web-link": "~3.3|~4.0", - "doctrine/annotations": "~1.0", + "doctrine/annotations": "~1.7", "doctrine/cache": "~1.0" }, "conflict": { diff --git a/src/Symfony/Component/PropertyInfo/composer.json b/src/Symfony/Component/PropertyInfo/composer.json index bf02fe0..f19e3d1 100644 --- a/src/Symfony/Component/PropertyInfo/composer.json +++ b/src/Symfony/Component/PropertyInfo/composer.json @@ -31,7 +31,7 @@ "symfony/cache": "~3.1|~4.0", "symfony/dependency-injection": "~3.3|~4.0", "phpdocumentor/reflection-docblock": "^3.0|^4.0", - "doctrine/annotations": "~1.0" + "doctrine/annotations": "~1.7" }, "conflict": { "phpdocumentor/reflection-docblock": "<3.0||>=3.2.0,<3.2.2", diff --git a/src/Symfony/Component/Validator/composer.json b/src/Symfony/Component/Validator/composer.json index 2f0e758..287e3c2 100644 --- a/src/Symfony/Component/Validator/composer.json +++ b/src/Symfony/Component/Validator/composer.json @@ -32,11 +32,12 @@ "symfony/expression-language": "~2.8|~3.0|~4.0", "symfony/cache": "~3.1|~4.0", "symfony/property-access": "~2.8|~3.0|~4.0", - "doctrine/annotations": "~1.0", + "doctrine/annotations": "~1.7", "doctrine/cache": "~1.0", - "egulias/email-validator": "^1.2.8|~2.0" + "egulias/email-validator": "^2.1.10" }, "conflict": { + "doctrine/lexer": "<1.0.2", "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0", "symfony/dependency-injection": "<3.3", "symfony/http-kernel": "<3.3.5", diff --git a/src/Symfony/Component/Workflow/composer.json b/src/Symfony/Component/Workflow/composer.json index 43e11c0..c0bb655 100644 --- a/src/Symfony/Component/Workflow/composer.json +++ b/src/Symfony/Component/Workflow/composer.json @@ -21,7 +21,7 @@ ], "require": { "php": "^5.5.9|>=7.0.8", - "symfony/property-access": "~2.3|~3.0|~4.0" + "symfony/property-access": "~3.4.31|^4.3.4" }, "require-dev": { "psr/log": "~1.0", |