summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-07-24 07:01:40 +0200
committerRemi Collet <fedora@famillecollet.com>2016-07-24 07:01:40 +0200
commit6554ace254235ab3e054e762dd075b22494fe73d (patch)
tree2f6e00358721a1adc8ea163753a475cb4807ab57
parent7fa6f94567dcc9fd8cc4472e08b91a033c6fbaa0 (diff)
php-silex: sync with Fedora
-rw-r--r--composer.json60
-rw-r--r--php-silex.spec78
2 files changed, 108 insertions, 30 deletions
diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000..17fd3e3
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,60 @@
+{
+ "name": "silex/silex",
+ "description": "The PHP micro-framework based on the Symfony Components",
+ "keywords": ["microframework"],
+ "homepage": "http://silex.sensiolabs.org",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Igor Wiedler",
+ "email": "igor@wiedler.ch"
+ }
+ ],
+ "require": {
+ "php": ">=5.3.9",
+ "pimple/pimple": "~1.0",
+ "symfony/event-dispatcher": "~2.3|3.0.*",
+ "symfony/http-foundation": "~2.3|3.0.*",
+ "symfony/http-kernel": "~2.3|3.0.*",
+ "symfony/routing": "~2.3|3.0.*"
+ },
+ "require-dev": {
+ "symfony/security": "~2.3|3.0.*",
+ "symfony/config": "~2.3|3.0.*",
+ "symfony/locale": "~2.3|3.0.*",
+ "symfony/form": "~2.3|3.0.*",
+ "symfony/browser-kit": "~2.3|3.0.*",
+ "symfony/css-selector": "~2.3|3.0.*",
+ "symfony/debug": "~2.3|3.0.*",
+ "symfony/dom-crawler": "~2.3|3.0.*",
+ "symfony/finder": "~2.3|3.0.*",
+ "symfony/monolog-bridge": "~2.3|3.0.*",
+ "symfony/options-resolver": "~2.3|3.0.*",
+ "symfony/phpunit-bridge": "~2.7",
+ "symfony/process": "~2.3|3.0.*",
+ "symfony/serializer": "~2.3|3.0.*",
+ "symfony/translation": "~2.3|3.0.*",
+ "symfony/twig-bridge": "~2.3|3.0.*",
+ "symfony/validator": "~2.3|3.0.*",
+ "twig/twig": "~1.8|~2.0",
+ "doctrine/dbal": "~2.2",
+ "swiftmailer/swiftmailer": "~5",
+ "monolog/monolog": "^1.4.1"
+ },
+ "autoload": {
+ "psr-4": { "Silex\\": "src/Silex" }
+ },
+ "autoload-dev" : {
+ "psr-4": { "Silex\\Tests\\" : "tests/Silex/Tests" }
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.3.x-dev"
+ }
+ },
+ "minimum-stability": "dev"
+}
diff --git a/php-silex.spec b/php-silex.spec
index 766c609..bc7a673 100644
--- a/php-silex.spec
+++ b/php-silex.spec
@@ -51,7 +51,7 @@
Name: php-%{composer_project}
Version: %{github_version}
-Release: 3%{dist}
+Release: 4%{dist}
Summary: PHP micro-framework based on the Symfony components
Group: Development/Libraries
@@ -205,32 +205,38 @@ if (!isset($fedoraClassLoader) || !($fedoraClassLoader instanceof \Symfony\Compo
$fedoraClassLoader->addPrefix('Silex\\', dirname(__DIR__));
-// Required dependencies
-require_once '%{phpdir}/Pimple1/autoload.php';
-require_once '%{phpdir}/Symfony/Component/EventDispatcher/autoload.php';
-require_once '%{phpdir}/Symfony/Component/HttpFoundation/autoload.php';
-require_once '%{phpdir}/Symfony/Component/HttpKernel/autoload.php';
-require_once '%{phpdir}/Symfony/Component/Routing/autoload.php';
-
-// Optional dependencies
-@include_once '%{phpdir}/Doctrine/DBAL/autoload.php';
-@include_once '%{phpdir}/Monolog/autoload.php';
-@include_once '%{phpdir}/Psr/Log/autoload.php';
-@include_once '%{phpdir}/Swift/swift_required.php';
-@include_once '%{phpdir}/Symfony/Bridge/Doctrine/autoload.php';
-@include_once '%{phpdir}/Symfony/Bridge/Monolog/autoload.php';
-@include_once '%{phpdir}/Symfony/Bridge/Twig/autoload.php';
-@include_once '%{phpdir}/Symfony/Component/BrowserKit/autoload.php';
-@include_once '%{phpdir}/Symfony/Component/Debug/autoload.php';
-@include_once '%{phpdir}/Symfony/Component/Finder/autoload.php';
-@include_once '%{phpdir}/Symfony/Component/Form/autoload.php';
-@include_once '%{phpdir}/Symfony/Component/Locale/autoload.php';
-@include_once '%{phpdir}/Symfony/Component/Process/autoload.php';
-@include_once '%{phpdir}/Symfony/Component/Security/autoload.php';
-@include_once '%{phpdir}/Symfony/Component/Serializer/autoload.php';
-@include_once '%{phpdir}/Symfony/Component/Translation/autoload.php';
-@include_once '%{phpdir}/Symfony/Component/Validator/autoload.php';
-@include_once '%{phpdir}/Twig/autoload.php';
+// Dependencies (autoloader => required)
+foreach(array(
+ // Required dependencies
+ '%{phpdir}/Pimple1/autoload.php' => true,
+ '%{phpdir}/Symfony/Component/EventDispatcher/autoload.php' => true,
+ '%{phpdir}/Symfony/Component/HttpFoundation/autoload.php' => true,
+ '%{phpdir}/Symfony/Component/HttpKernel/autoload.php' => true,
+ '%{phpdir}/Symfony/Component/Routing/autoload.php' => true,
+ // Optional dependencies
+ '%{phpdir}/Doctrine/DBAL/autoload.php' => false,
+ '%{phpdir}/Monolog/autoload.php' => false,
+ '%{phpdir}/Psr/Log/autoload.php' => false,
+ '%{phpdir}/Swift/swift_required.php' => false,
+ '%{phpdir}/Symfony/Bridge/Doctrine/autoload.php' => false,
+ '%{phpdir}/Symfony/Bridge/Monolog/autoload.php' => false,
+ '%{phpdir}/Symfony/Bridge/Twig/autoload.php' => false,
+ '%{phpdir}/Symfony/Component/BrowserKit/autoload.php' => false,
+ '%{phpdir}/Symfony/Component/Debug/autoload.php' => false,
+ '%{phpdir}/Symfony/Component/Finder/autoload.php' => false,
+ '%{phpdir}/Symfony/Component/Form/autoload.php' => false,
+ '%{phpdir}/Symfony/Component/Locale/autoload.php' => false,
+ '%{phpdir}/Symfony/Component/Process/autoload.php' => false,
+ '%{phpdir}/Symfony/Component/Security/autoload.php' => false,
+ '%{phpdir}/Symfony/Component/Serializer/autoload.php' => false,
+ '%{phpdir}/Symfony/Component/Translation/autoload.php' => false,
+ '%{phpdir}/Symfony/Component/Validator/autoload.php' => false,
+ '%{phpdir}/Twig/autoload.php' => false,
+) as $dependencyAutoloader => $required) {
+ if ($required || file_exists($dependencyAutoloader)) {
+ require_once $dependencyAutoloader;
+ }
+}
return $fedoraClassLoader;
AUTOLOAD
@@ -278,11 +284,20 @@ rm -f \
tests/Silex/Tests/Application/SwiftmailerTraitTest.php
: Run tests
+run=0
+ret=0
+if which php56; then
+ php56 %{_bindir}/phpunit --bootstrap bootstrap.php || ret=1
+ run=1
+fi
+if which php71; then
+ php71 %{_bindir}/phpunit --bootstrap bootstrap.php || ret=1
+ run=1
+fi
+if [ $run -eq 0 ]; then
%{_bindir}/phpunit --verbose --bootstrap bootstrap.php
-
-if which php70; then
- php70 %{_bindir}/phpunit --verbose --bootstrap bootstrap.php
fi
+exit $ret
%else
: Tests skipped
%endif
@@ -303,6 +318,9 @@ rm -rf %{buildroot}
%changelog
+* Sat Jul 23 2016 Shawn Iwinski <shawn.iwinski@gmail.com> - 1.3.5-4
+- Updated autoloader to not use "@include_once"
+
* Fri Apr 01 2016 Shawn Iwinski <shawn.iwinski@gmail.com> - 1.3.5-3
- Use actual package names (instead of virtual provides) for conflicts