summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer.json24
-rw-r--r--zephir-rpm.patch59
-rw-r--r--zephir.spec127
3 files changed, 149 insertions, 61 deletions
diff --git a/composer.json b/composer.json
index b8e242a..bf1495f 100644
--- a/composer.json
+++ b/composer.json
@@ -29,16 +29,29 @@
"ext-mbstring": "*",
"ext-pcre": "*",
"ext-xml": "*",
- "league/container": "^2.4 || ^3.2",
- "league/flysystem": "1.0.*",
- "symfony/console": "3.4.*"
+ "oneup/flysystem-bundle": "^1.14 || ^3.0",
+ "symfony/cache": "3.4.*",
+ "symfony/config": "3.4.*",
+ "symfony/console": "3.4.*",
+ "symfony/dependency-injection": "3.4.*",
+ "symfony/event-dispatcher": "3.4.*",
+ "symfony/filesystem": "3.4.*",
+ "symfony/finder": "3.4.*",
+ "symfony/framework-bundle": "3.4.*",
+ "symfony/http-kernel": "3.4.*",
+ "symfony/monolog-bridge": "3.4.*",
+ "symfony/monolog-bundle": "3.3.*",
+ "symfony/routing": "3.4.*",
+ "symfony/yaml": "3.4.*"
},
"require-dev": {
"ext-gmp": "*",
"ext-pdo": "*",
"ext-pdo_sqlite": "*",
- "phpunit/phpunit": "~5.7",
- "squizlabs/php_codesniffer": "~3.2"
+ "ext-zip": "*",
+ "psr/log": "1.1.*",
+ "symfony/debug": "3.4.*",
+ "symfony/phpunit-bridge": "4.1.*"
},
"config": {
"optimize-autoloader": true,
@@ -57,7 +70,6 @@
"autoload-dev": {
"psr-4": {
"Zephir\\Test\\": "unit-tests/Zephir/Test/",
- "Zephir\\Support\\": "unit-tests/Zephir/Support/",
"Extension\\": "unit-tests/Extension/"
},
"classmap": [
diff --git a/zephir-rpm.patch b/zephir-rpm.patch
index 45e07cb..3239650 100644
--- a/zephir-rpm.patch
+++ b/zephir-rpm.patch
@@ -1,42 +1,33 @@
-diff -up ./zephir.rpm ./zephir
---- ./zephir.rpm 2018-11-18 10:28:31.000000000 +0100
-+++ ./zephir 2018-11-19 15:44:52.976871411 +0100
-@@ -1,4 +1,3 @@
--#!/usr/bin/env php
- <?php
-
- /**
-@@ -22,32 +21,7 @@ if (PHP_SAPI !== 'cli') {
- );
+diff -up ./Library/autoload.php.rpm ./Library/autoload.php
+--- ./Library/autoload.php.rpm 2018-11-28 15:59:50.923865048 +0100
++++ ./Library/autoload.php 2018-11-28 16:16:41.880180099 +0100
+@@ -39,20 +39,5 @@ if (PHP_SAPI !== 'cli' && PHP_SAPI !== '
+ exit(1);
}
--if (class_exists('Composer\Autoload\ClassLoader', false) == false) {
-- if (\substr(__FILE__, 0, 5) === 'phar:') {
-- $solution = 'Try to reinstall Zephir to solve this problem.' . PHP_EOL;
-- } else {
-- $solution =
-- 'You need to set up the project dependencies using Composer:' . PHP_EOL . PHP_EOL .
-- ' composer install' . PHP_EOL . PHP_EOL .
-- 'You can learn all about Composer:' . PHP_EOL .
-- ' - https://getcomposer.org' . PHP_EOL;
+-$autoloaders = [
+- __DIR__.'/../vendor/autoload.php', // Is installed locally
+- __DIR__.'/../../../autoload.php', // Is installed via Composer
+-];
++require_once dirname(__DIR__) . '/autoload.php';
+
+-foreach ($autoloaders as $file) {
+- if (\file_exists($file)) {
+- include_once $file;
+- break;
- }
+-}
-
-- fprintf(
-- STDERR,
-- 'Unable to locate system dependencies.' . PHP_EOL .
-- '%s' . PHP_EOL .
-- 'If the problem remains, ask for help on the forum:' . PHP_EOL .
-- ' - https://forum.zephir-lang.com ' . PHP_EOL . PHP_EOL .
-- 'Or file an issue at GitHub:' . PHP_EOL .
-- ' - https://github.com/phalcon/zephir' . PHP_EOL . PHP_EOL,
-- $solution
-- );
+-if (false == \class_exists('Composer\Autoload\ClassLoader', false)) {
+- \fwrite(STDERR, 'Unable to find the Composer autoloader.'.PHP_EOL);
-
- exit(1);
-}
--
--$app = new Application(__DIR__);
-+$app = new Application("@DATADIR@/zephir");
+diff -up ./zephir.rpm ./zephir
+--- ./zephir.rpm 2018-11-27 22:28:25.000000000 +0100
++++ ./zephir 2018-11-28 15:57:43.690197659 +0100
+@@ -1,4 +1,3 @@
+-#!/usr/bin/env php
+ <?php
- $app->add(new Zephir\Command\InitCommand());
- $app->add(new Zephir\Command\GenerateCommand());
+ /**
diff --git a/zephir.spec b/zephir.spec
index d81a8a3..10636f5 100644
--- a/zephir.spec
+++ b/zephir.spec
@@ -21,7 +21,7 @@
# Get commit from PHP_PHALCON_ZEPVERSION in
# https://github.com/phalcon/cphalcon/blob/master/ext/php_phalcon.h
-%global gh_commit d6e6628d7e59065d1fe53f2a5dea048e7f1cb2f2
+%global gh_commit 641bd9832ad8d4c3733f1b3d23e489d6330eb64a
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
#global gh_date 20161126
%global gh_owner phalcon
@@ -30,7 +30,7 @@
%global parser_ver 1.1.1
Name: %{?scl_prefix}%{gh_project}
-Version: 0.11.6
+Version: 0.11.7
Release: 1%{?gh_date:.%{gh_date}.%{gh_short}}%{?dist}
Summary: Zephir language for creation of extensions for PHP.
@@ -52,24 +52,58 @@ BuildRequires: %{?scl_prefix}php-ctype
BuildRequires: %{?scl_prefix}php-psr
BuildRequires: %{_bindir}/phpab
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-BuildRequires: (php-composer(league/container) >= 2.4 with php-composer(league/container) < 3)
-BuildRequires: (php-composer(league/flysystem) >= 1.0 with php-composer(league/flysystem) < 1.1)
-BuildRequires: (php-composer(symfony/console) >= 3.4 with php-composer(symfony/console) < 4)
+BuildRequires: (php-composer(oneup/flysystem-bundle) >= 1.14 with php-composer(oneup/flysystem-bundle) < 4)
+BuildRequires: (php-composer(symfony/cache) >= 3.4 with php-composer(symfony/cache) < 4)
+BuildRequires: (php-composer(symfony/config) >= 3.4 with php-composer(symfony/config) < 4)
+BuildRequires: (php-composer(symfony/console) >= 3.4 with php-composer(symfony/console) < 4)
+BuildRequires: (php-composer(symfony/dependency-injection) >= 3.4 with php-composer(symfony/dependency-injection) < 4)
+BuildRequires: (php-composer(symfony/event-dispatcher) >= 3.4 with php-composer(symfony/event-dispatcher) < 4)
+BuildRequires: (php-composer(symfony/filesystem) >= 3.4 with php-composer(symfony/filesystem) < 4)
+BuildRequires: (php-composer(symfony/finder) >= 3.4 with php-composer(symfony/finder) < 4)
+BuildRequires: (php-composer(symfony/framework-bundle) >= 3.4 with php-composer(symfony/framework-bundle) < 4)
+BuildRequires: (php-composer(symfony/http-kernel) >= 3.4 with php-composer(symfony/http-kernel) < 4)
+BuildRequires: (php-composer(symfony/monolog-bridge) >= 3.4 with php-composer(symfony/monolog-bridge) < 4)
+#BuildRequires: (php-composer(symfony/monolog-bundle) >= 3.4 with php-composer(symfony/monolog-bundle) < 4)
+BuildRequires: (php-composer(symfony/routing) >= 3.4 with php-composer(symfony/routing) < 4)
+BuildRequires: (php-composer(symfony/yaml) >= 3.4 with php-composer(symfony/yaml) < 4)
%else
-BuildRequires: php-league-flysystem
-BuildRequires: php-league-container
+BuildRequires: php-oneup-flysystem-bundle
+BuildRequires: php-symfony3-cache
+BuildRequires: php-symfony3-config
BuildRequires: php-symfony3-console
+BuildRequires: php-symfony3-dependency-injection
+BuildRequires: php-symfony3-event-dispatcher
+BuildRequires: php-symfony3-filesystem
+BuildRequires: php-symfony3-finder
+BuildRequires: php-symfony3-framework-bundle
+BuildRequires: php-symfony3-http-kernel
+BuildRequires: php-symfony3-monolog-bridge
+#BuildRequires: php-symfony3-monolog-bundle
+BuildRequires: php-symfony3-routing
+BuildRequires: php-symfony3-yaml
%endif
# From composer.json, "require-dev"
# "ext-gmp": "*",
# "ext-pdo": "*",
# "ext-pdo_sqlite": "*",
-# "phpunit/phpunit": "~5.7",
-# "squizlabs/php_codesniffer": "~3.2"
+# "ext-zip": "*",
+# "psr/log": "1.1.*",
+# "symfony/debug": "3.4.*",
+# "symfony/phpunit-bridge": "4.1.*"
BuildRequires: %{?scl_prefix}php-gmp
BuildRequires: %{?scl_prefix}php-pdo
BuildRequires: %{?scl_prefix}php-pdo_sqlite
-BuildRequires: %{?scl_prefix}php-composer(phpunit/phpunit) >= 5.7
+BuildRequires: %{?scl_prefix}php-zip
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+BuildRequires: (php-composer(psr/log) >= 1.1 with php-composer(psr/log) < 2)
+BuildRequires: (php-composer(symfony/debug) >= 3.4 with php-composer(symfony/debug) < 4)
+BuildRequires: (php-composer(symfony/phpunit-bridge) >= 3.4 with php-composer(symfony/phpunit-bridge) < 4)
+%else
+BuildRequires: php-PsrLog
+BuildRequires: php-symfony3-debug
+BuildRequires: php-symfony3-phpunit-bridge
+%endif
+BuildRequires: %{_bindir}/phpunit
%endif
Requires: %{?scl_prefix}php-cli
@@ -83,9 +117,20 @@ Requires: %{?scl_prefix}php-zephir-parser >= %{parser_ver}
# "ext-mbstring": "*",
# "ext-pcre": "*",
# "ext-xml": "*"
-# "league/container": "^2.4 || ^3.2",
-# "league/flysystem": "1.0.*",
-# "symfony/console": "3.4.*"
+# "oneup/flysystem-bundle": "^1.14 || ^3.0",
+# "symfony/cache": "3.4.*",
+# "symfony/config": "3.4.*",
+# "symfony/console": "3.4.*",
+# "symfony/dependency-injection": "3.4.*",
+# "symfony/event-dispatcher": "3.4.*",
+# "symfony/filesystem": "3.4.*",
+# "symfony/finder": "3.4.*",
+# "symfony/framework-bundle": "3.4.*",
+# "symfony/http-kernel": "3.4.*",
+# "symfony/monolog-bridge": "3.4.*",
+# "symfony/monolog-bundle": "3.3.*",
+# "symfony/routing": "3.4.*",
+# "symfony/yaml": "3.4.*"
Requires: %{?scl_prefix}php(language) >= 5.6
Requires: %{?scl_prefix}php-spl
Requires: %{?scl_prefix}php-ctype
@@ -95,13 +140,35 @@ Requires: %{?scl_prefix}php-mbstring
Requires: %{?scl_prefix}php-pcre
Requires: %{?scl_prefix}php-xml
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-Requires: (php-composer(league/container) >= 2.4 with php-composer(league/container) < 3)
-Requires: (php-composer(league/flysystem) >= 1.0 with php-composer(league/flysystem) < 1.1)
-Requires: (php-composer(symfony/console) >= 3.4 with php-composer(symfony/console) < 4)
+Requires: (php-composer(oneup/flysystem-bundle) >= 1.14 with php-composer(oneup/flysystem-bundle) < 4)
+Requires: (php-composer(symfony/cache) >= 3.4 with php-composer(symfony/cache) < 4)
+Requires: (php-composer(symfony/config) >= 3.4 with php-composer(symfony/config) < 4)
+Requires: (php-composer(symfony/console) >= 3.4 with php-composer(symfony/console) < 4)
+Requires: (php-composer(symfony/dependency-injection) >= 3.4 with php-composer(symfony/dependency-injection) < 4)
+Requires: (php-composer(symfony/event-dispatcher) >= 3.4 with php-composer(symfony/event-dispatcher) < 4)
+Requires: (php-composer(symfony/filesystem) >= 3.4 with php-composer(symfony/filesystem) < 4)
+Requires: (php-composer(symfony/finder) >= 3.4 with php-composer(symfony/finder) < 4)
+Requires: (php-composer(symfony/framework-bundle) >= 3.4 with php-composer(symfony/framework-bundle) < 4)
+Requires: (php-composer(symfony/http-kernel) >= 3.4 with php-composer(symfony/http-kernel) < 4)
+Requires: (php-composer(symfony/monolog-bridge) >= 3.4 with php-composer(symfony/monolog-bridge) < 4)
+#Requires: (php-composer(symfony/monolog-bundle) >= 3.4 with php-composer(symfony/monolog-bundle) < 4)
+Requires: (php-composer(symfony/routing) >= 3.4 with php-composer(symfony/routing) < 4)
+Requires: (php-composer(symfony/yaml) >= 3.4 with php-composer(symfony/yaml) < 4)
%else
-Requires: php-league-flysystem
-Requires: php-league-container
+Requires: php-oneup-flysystem-bundle
+Requires: php-symfony3-cache
+Requires: php-symfony3-config
Requires: php-symfony3-console
+Requires: php-symfony3-dependency-injection
+Requires: php-symfony3-event-dispatcher
+Requires: php-symfony3-filesystem
+Requires: php-symfony3-finder
+Requires: php-symfony3-framework-bundle
+Requires: php-symfony3-http-kernel
+Requires: php-symfony3-monolog-bridge
+#Requires: php-symfony3-monolog-bundle
+Requires: php-symfony3-routing
+Requires: php-symfony3-yaml
%endif
# From phpcompatinfo
Requires: %{?scl_prefix}php-reflection
@@ -153,9 +220,20 @@ require_once '%{_datadir}/php/Fedora/Autoloader/autoload.php';
\Fedora\Autoloader\Autoload::addPsr4('Zephir\\', __DIR__ . '/Library');
\Fedora\Autoloader\Dependencies::required([
__DIR__ . '/Library/functions.php',
+ '%{_datadir}/php/Oneup/FlysystemBundle/autoload.php',
+ '%{_datadir}/php/Symfony3/Component/Cache/autoload.php',
+ '%{_datadir}/php/Symfony3/Component/Config/autoload.php',
'%{_datadir}/php/Symfony3/Component/Console/autoload.php',
- '%{_datadir}/php/League/Flysystem/autoload.php',
- '%{_datadir}/php/League/Container/autoload.php',
+ '%{_datadir}/php/Symfony3/Component/DependencyInjection/autoload.php',
+ '%{_datadir}/php/Symfony3/Component/EventDispatcher/autoload.php',
+ '%{_datadir}/php/Symfony3/Component/Filesystem/autoload.php',
+ '%{_datadir}/php/Symfony3/Component/Finder/autoload.php',
+ '%{_datadir}/php/Symfony3/Bundle/FrameworkBundle/autoload.php',
+ '%{_datadir}/php/Symfony3/Component/HttpKernel/autoload.php',
+ '%{_datadir}/php/Symfony3/Bridge/Monolog/autoload.php',
+ // '%{_datadir}/php/Symfony3/Bundle/Monolog/autoload.php',
+ '%{_datadir}/php/Symfony3/Component/Routing/autoload.php',
+ '%{_datadir}/php/Symfony3/Component/Yaml/autoload.php',
]);
EOF
@@ -196,8 +274,12 @@ sed -e 's:%{_datadir}:%{buildroot}%{_datadir}:' \
%{_bindir}/php %{_bindir}/phpab -o bs.php unit-tests/fixtures/mocks
cat << 'EOF' | tee -a bs.php
require '%{buildroot}%{_datadir}/%{gh_project}/autoload.php';
+\Fedora\Autoloader\Dependencies::required([
+ '%{_datadir}/php/Psr/Log/autoload.php',
+ '%{_datadir}/php/Symfony3/Component/Debug/autoload.php',
+ '%{_datadir}/php/Symfony3/Bridge/PhpUnit/autoload.php',
+]);
\Fedora\Autoloader\Autoload::addPsr4('Zephir\\Test\\', __DIR__ . '/unit-tests/Zephir/Test/');
-\Fedora\Autoloader\Autoload::addPsr4('Zephir\\Support\\', __DIR__ . '/unit-tests/Zephir/Support/');
\Fedora\Autoloader\Autoload::addPsr4('Extension\\', __DIR__ . '/unit-tests/Extension/');
require __DIR__ . '/unit-tests/bootstrap.php';
EOF
@@ -233,6 +315,9 @@ EOF
%changelog
+* Wed Nov 28 2018 Remi Collet <remi@remirepo.net> - 0.11.7-1
+- update to 0.11.7
+
* Tue Nov 20 2018 Remi Collet <remi@remirepo.net> - 0.11.6-1
- update to 0.11.6