summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2017-06-12 07:15:19 +0200
committerRemi Collet <remi@remirepo.net>2017-06-12 07:15:19 +0200
commita6884b8220900063b9e5a063b1f788da9cb181cc (patch)
tree0c74f5b4edffaaa5faa903869027ac261c367645
parentea739d9986a849ee77995ac3ffe66b98f46bc016 (diff)
v3.2.9 (backported from Fedora)
-rwxr-xr-xphp-symfony3-generate-autoloaders.php2
-rw-r--r--php-symfony3.spec162
2 files changed, 97 insertions, 67 deletions
diff --git a/php-symfony3-generate-autoloaders.php b/php-symfony3-generate-autoloaders.php
index 8d55fbd..915d3a3 100755
--- a/php-symfony3-generate-autoloaders.php
+++ b/php-symfony3-generate-autoloaders.php
@@ -63,7 +63,7 @@ final class AutoloadGenerator {
],
'phpdocumentor/reflection-docblock' => [
'prefix' => 'FEDORA_SYMFONY3_PHP_DIR',
- 'path' => 'phpDocumentor/Reflection/DocBlock3/autoload.php',
+ 'path' => 'phpDocumentor/Reflection/DocBlock/autoload.php',
],
'psr/cache-implementation' => false,
'psr/cache' => [
diff --git a/php-symfony3.spec b/php-symfony3.spec
index 5734622..0ee156a 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.2.8
-%global github_commit 85959c2abbe4d2f050f950f39c9c3cf83819f3df
+%global github_version 3.2.9
+%global github_commit 78c08f2faa42210db4fe6f4ece73891ca546a9a0
%global composer_vendor symfony
%global composer_project symfony
@@ -22,8 +22,9 @@
# "php": ">=5.5.9"
%global php_min_ver 5.5.9
# "cache/integration-tests": "dev-master"
-#%%global cache_integration_tests_min_ver
-#%%global cache_integration_tests_max_ver
+# 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"
# src/Symfony/Bundle/FrameworkBundle/composer.json
# src/Symfony/Bundle/TwigBundle/composer.json
@@ -92,8 +93,6 @@
# Build using "--without tests" to disable tests
%global with_tests 0%{!?_without_tests:1}
-%global with_cache_integration_tests 0
-%global with_phpdocumentor_reflection_docblock 0
%global with_sensio_framework_extra_bundle 0
%global php_version_id %(%{_bindir}/php -r "echo PHP_VERSION_ID;")
@@ -105,7 +104,7 @@
Name: php-%{composer_project}3
Version: %{github_version}
-Release: 2%{?dist}
+Release: 1%{?dist}
Summary: Symfony PHP framework (version 3)
Group: Development/Libraries
@@ -124,6 +123,8 @@ BuildArch: noarch
## composer.json
### Force version to 4.8 for autoloader
BuildRequires: php(language) >= %{php_min_ver}
+BuildRequires: php-composer(cache/integration-tests) < %{cache_integration_tests_max_ver}
+BuildRequires: php-composer(cache/integration-tests) >= %{cache_integration_tests_min_ver}
BuildRequires: php-composer(doctrine/annotations) < %{doctrine_annotations_max_ver}
BuildRequires: php-composer(doctrine/annotations) >= %{doctrine_annotations_min_ver}
BuildRequires: php-composer(doctrine/cache) < %{doctrine_cache_max_ver}
@@ -144,6 +145,8 @@ BuildRequires: php-composer(monolog/monolog) < %{monolog_max_ver}
BuildRequires: php-composer(monolog/monolog) >= %{monolog_min_ver}
BuildRequires: php-composer(ocramius/proxy-manager) < %{proxy_manager_max_ver}
BuildRequires: php-composer(ocramius/proxy-manager) >= %{proxy_manager_min_ver}
+BuildRequires: php-composer(phpdocumentor/reflection-docblock) < %{phpdocumentor_reflection_docblock_max_ver}
+BuildRequires: php-composer(phpdocumentor/reflection-docblock) >= %{phpdocumentor_reflection_docblock_min_ver}
BuildRequires: php-composer(phpunit/phpunit)
BuildRequires: php-composer(psr/cache) < %{psr_cache_max_ver}
BuildRequires: php-composer(psr/cache) >= %{psr_cache_min_ver}
@@ -155,13 +158,6 @@ BuildRequires: php-composer(symfony/security-acl) < %{symfony_security_acl_max_
BuildRequires: php-composer(symfony/security-acl) >= %{symfony_security_acl_min_ver}
BuildRequires: php-composer(twig/twig) < %{twig_max_ver}
BuildRequires: php-composer(twig/twig) >= %{twig_min_ver}
-%if %{with_cache_integration_tests}
-BuildRequires: php-composer(cache/integration-tests)
-%endif
-%if %{with_phpdocumentor_reflection_docblock}
-BuildRequires: php-composer(phpdocumentor/reflection-docblock) < %{phpdocumentor_reflection_docblock_max_ver}
-BuildRequires: php-composer(phpdocumentor/reflection-docblock) >= %{phpdocumentor_reflection_docblock_min_ver}
-%endif
%if %{with_sensio_framework_extra_bundle}
BuildRequires: php-composer(sensio/framework-extra-bundle) < %{sensio_framework_extra_bundle_max_ver}
BuildRequires: php-composer(sensio/framework-extra-bundle) >= %{sensio_framework_extra_bundle_min_ver}
@@ -252,7 +248,9 @@ Requires: php-composer(%{composer_vendor}/yaml) = %{version}
Provides: php-composer(%{composer_vendor}/%{composer_project}) = %{version}
%description
-%{summary}
+%{summary}.
+
+NOTE: Does not require PHPUnit bridge.
# ##############################################################################
@@ -344,32 +342,34 @@ Autoloader: %{symfony3_dir}/Bridge/Monolog/autoload.php
# ------------------------------------------------------------------------------
-#%%package phpunit-bridge
+%package phpunit-bridge
-#Summary: Symfony PHPUnit Bridge (version 3)
+Summary: Symfony PHPUnit Bridge (version 3)
-#Requires: php(language) >= 5.3.3
+Requires: php(language) >= 5.3.3
# composer.json: optional
-#Suggests: php-composer(%%{composer_vendor}/debug) = %%{version}
-#Suggests: php-pecl(zip)
+%if 0%{?fedora}
+Suggests: php-composer(%{composer_vendor}/debug) = %{version}
+Suggests: php-pecl(zip)
+%endif
# phpcompatinfo (computed from version 3.2.4)
-#Requires: php-date
-#Requires: php-pcre
-#Requires: php-posix
-#Requires: php-reflection
+Requires: php-date
+Requires: php-pcre
+Requires: php-posix
+Requires: php-reflection
# Composer
-#Provides: php-composer(%%{composer_vendor}/phpunit-bridge) = %%{version}
+Provides: php-composer(%{composer_vendor}/phpunit-bridge) = %{version}
-#%%description phpunit-bridge
-#Provides utilities for PHPUnit, especially user deprecation notices management.
+%description phpunit-bridge
+Provides utilities for PHPUnit, especially user deprecation notices management.
-#It comes with the following features:
-#* disable the garbage collector
-#* auto-register class_exists to load Doctrine annotations
-#* print a user deprecation notices summary at the end of the test suite.
+It comes with the following features:
+* disable the garbage collector
+* auto-register class_exists to load Doctrine annotations
+* print a user deprecation notices summary at the end of the test suite.
-#Autoloader: %%{phpdir}/Symfony/Bridge/PhpUnit/autoload.php
+Autoloader: %{symfony3_dir}/Bridge/PhpUnit/autoload.php
# ------------------------------------------------------------------------------
@@ -672,6 +672,7 @@ Autoloader: %{symfony3_dir}/Component/BrowserKit/autoload.php
Summary: Symfony implementation of PSR-6 (version 3)
URL: http://symfony.com/doc/%{symfony3_doc_ver}/components/cache.html
+Requires: %{name}-common = %{version}-%{release}
# composer.json
Requires: php-composer(psr/cache) < %{psr_cache_max_ver}
Requires: php-composer(psr/cache) >= %{psr_cache_min_ver}
@@ -1309,7 +1310,9 @@ Requires: php-composer(%{composer_vendor}/inflector) = %{version}
Suggests: php-composer(%{composer_vendor}/doctrine-bridge)
Suggests: php-composer(%{composer_vendor}/serializer)
Suggests: php-composer(psr/cache-implementation)
-Suggests: php-phpdocumentor-reflection-docblock3
+## NOTE: Not php-composer(phpdocumentor/reflection-docblock) to ensure
+## php-phpdocumentor-reflection-docblock2 is not chosen
+Suggests: php-phpdocumentor-reflection-docblock
%endif
# phpcompatinfo (computed from version 3.2.4)
Requires: php-pcre
@@ -1718,7 +1721,7 @@ if (!defined('FEDORA_SYMFONY3_DIR')) {
\Fedora\Autoloader\Autoload::addPsr4('Symfony\\Component\\', FEDORA_SYMFONY3_DIR.'/Component', true);
AUTOLOAD
-: Create autoloaders
+: Create individual sub-package autoloaders
for AUTOLOADER in $(./%{name}-generate-autoloaders.php)
do
sed \
@@ -1730,6 +1733,33 @@ do
cat $AUTOLOADER
done
+: Create whole framework autoloader
+cat <<AUTOLOAD | tee src/Symfony/autoload.php
+<?php
+/**
+ * Autoloader for %{name} and its' dependencies
+ * (created by %{name}-%{version}-%{release}).
+ */
+require_once __DIR__.'/autoload-common.php';
+
+\Fedora\Autoloader\Dependencies::required(glob('*/*/autoload.php'));
+AUTOLOAD
+
+: Create per-type autoloaders
+for TYPE in Bridge Bundle Component
+do
+ cat <<AUTOLOAD | tee src/Symfony/${TYPE}/autoload.php
+<?php
+/**
+ * Autoloader for %{name} and its' dependencies
+ * (created by %{name}-%{version}-%{release}).
+ */
+require_once dirname(__DIR__).'/autoload-common.php';
+
+\Fedora\Autoloader\Dependencies::required(glob('*/autoload.php'));
+AUTOLOAD
+done
+
%install
mkdir -p %{buildroot}%{symfony3_dir}
@@ -1758,7 +1788,7 @@ PSR0=$(pwd)/psr0/Symfony
: Modify PHPUnit config
sed -e 's#vendor/autoload\.php#bootstrap.php#' \
- -e 's#\./src/Symfony/#%{buildroot}%{phpdir}/Symfony3/#' \
+ -e 's#\./src/Symfony/#%{buildroot}%{symfony3_dir}/#' \
phpunit.xml.dist > phpunit.xml
: Skip tests requiring ldap server to connect to
@@ -1801,23 +1831,9 @@ sed 's/function testHandleClassNotFound/function SKIP_testHandleClassNotFound/'
# TODO: Investigate!!!!!
: Skip Intl JSON tests
rm -rf %{buildroot}%{symfony3_dir}/Component/Intl/Tests/Data/Provider/Json
-
-%if !%{with_cache_integration_tests}
-rm -f %{buildroot}%{symfony3_dir}/Component/Cache/Tests/Adapter/*
-%endif
-
-%if !%{with_phpdocumentor_reflection_docblock}
-: Skip tests requiring "phpdocumentor/reflection-docblock"
-rm -f \
- %{buildroot}%{symfony3_dir}/Bundle/FrameworkBundle/Tests/Functional/PropertyInfoTest.php \
- %{buildroot}%{symfony3_dir}/Bundle/FrameworkBundle/Tests/Functional/SerializerTest.php \
- %{buildroot}%{symfony3_dir}/Component/PropertyInfo/Tests/Extractors/PhpDocExtractorTest.php
-sed \
- -e 's/function testAcceptJsonNumber/function SKIP_testAcceptJsonNumber/' \
- -e 's/function testDenomalizeRecursive/function SKIP_testDenomalizeRecursive/' \
- -e 's/function testRejectInvalidKey/function SKIP_testRejectInvalidKey/' \
- -i %{buildroot}%{symfony3_dir}/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php
-%endif
+: Skip tests known to fail
+sed -e 's/function testFormat(/function SKIP_testFormat(/' \
+ -i %{buildroot}%{symfony3_dir}/Component/Intl/Tests/DateFormatter/AbstractIntlDateFormatterTest.php
%if !%{with_sensio_framework_extra_bundle}
: Skip tests requiring "sensio/framework-extra-bundle"
@@ -1826,7 +1842,7 @@ rm -f %{buildroot}%{symfony3_dir}/Bundle/FrameworkBundle/Tests/Functional/Annota
: Run tests
RET=0
-for PKG in %{buildroot}%{phpdir}/Symfony3/*/*; do
+for PKG in %{buildroot}%{symfony3_dir}/*/*; do
%if 0%{?rhel} == 6
if [ "$(basename $PKG)" = "DomCrawler" ]; then
: Skip as libxml is too old
@@ -1842,7 +1858,7 @@ for PKG in %{buildroot}%{phpdir}/Symfony3/*/*; do
cat << BOOTSTRAP | tee bootstrap.php
<?php
require_once '${PKG}/autoload.php';
-require_once '%{buildroot}%{phpdir}/Symfony3/Bridge/PhpUnit/bootstrap.php';
+require_once '%{buildroot}%{symfony3_dir}/Bridge/PhpUnit/bootstrap.php';
// For require-dev or suggest "psr/cache-implementation".
if (in_array(basename('$PKG'), [
@@ -1852,7 +1868,7 @@ if (in_array(basename('$PKG'), [
'Serializer',
'Validator',
])) {
- require_once '%{buildroot}%{phpdir}/Symfony3/Component/Cache/autoload.php';
+ require_once '%{buildroot}%{symfony3_dir}/Component/Cache/autoload.php';
}
// For require-dev "psr/log".
@@ -1871,6 +1887,7 @@ if (in_array(basename('$PKG'), [
// For cache component's require-dev.
if ('Cache' == basename('$PKG')) {
+ require_once '%{phpdir}/Cache/IntegrationTests/autoload.php';
require_once '%{phpdir}/Doctrine/Common/Cache/autoload.php';
require_once '%{phpdir}/Doctrine/DBAL/autoload.php';
}
@@ -1904,12 +1921,14 @@ exit $RET
%license LICENSE
%dir %{symfony3_dir}
+ %{symfony3_dir}/autoload.php
%{symfony3_dir}/autoload-common.php
%dir %{symfony3_dir}/Bridge
+ %{symfony3_dir}/Bridge/autoload.php
%dir %{symfony3_dir}/Bundle
+ %{symfony3_dir}/Bundle/autoload.php
%dir %{symfony3_dir}/Component
-
-%exclude %{symfony3_dir}/Bridge/PhpUnit
+ %{symfony3_dir}/Component/autoload.php
# ------------------------------------------------------------------------------
@@ -1943,17 +1962,17 @@ exit $RET
# ------------------------------------------------------------------------------
-#%%files phpunit-bridge
+%files phpunit-bridge
-#%%license src/Symfony/Bridge/PhpUnit/LICENSE
-#%%doc src/Symfony/Bridge/PhpUnit/*.md
-#%%doc src/Symfony/Bridge/PhpUnit/composer.json
+%license src/Symfony/Bridge/PhpUnit/LICENSE
+%doc src/Symfony/Bridge/PhpUnit/*.md
+%doc src/Symfony/Bridge/PhpUnit/composer.json
-#%%{symfony3_dir}/Bridge/PhpUnit
-#%%exclude %%{symfony3_dir}/Bridge/PhpUnit/LICENSE
-#%%exclude %%{symfony3_dir}/Bridge/PhpUnit/*.md
-#%%exclude %%{symfony3_dir}/Bridge/PhpUnit/composer.json
-#%%exclude %%{symfony3_dir}/Bridge/PhpUnit/phpunit.*
+%{symfony3_dir}/Bridge/PhpUnit
+%exclude %{symfony3_dir}/Bridge/PhpUnit/LICENSE
+%exclude %{symfony3_dir}/Bridge/PhpUnit/*.md
+%exclude %{symfony3_dir}/Bridge/PhpUnit/composer.json
+%exclude %{symfony3_dir}/Bridge/PhpUnit/phpunit.*
# ------------------------------------------------------------------------------
@@ -2580,6 +2599,17 @@ exit $RET
# ##############################################################################
%changelog
+* Sun Jun 11 2017 Shawn Iwinski <shawn@iwin.ski> - 3.2.9-1
+- Update to 3.2.9
+- Use php-composer(cache/integration-tests)
+- Use php-composer(phpdocumentor/reflection-docblock)
+- Provide php-composer(symfony/phpunit-bridge)
+- Provide whole framework autoloader
+- Provide per-type (Bridge, Bundle, Component) autoloaders
+
+* Mon May 15 2017 Remi Collet <remi@remirepo.net> - 3.2.8-3
+- add missing dependency on common for cache
+
* Wed May 10 2017 Remi Collet <remi@remirepo.net> - 3.2.8-2
- add missing dependency on debug for console
- add depdencency on php-symfony-class-loader for class-loader