summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore8
-rw-r--r--composer.json4
-rwxr-xr-xphp-doctrine-doctrine-bundle-get-source.sh64
-rw-r--r--php-doctrine-doctrine-bundle-vendor.patch24
-rw-r--r--php-doctrine-doctrine-bundle.spec58
5 files changed, 126 insertions, 32 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..fc9aa8c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,8 @@
+clog
+package-*.xml
+*.tgz
+*.tar.gz
+*.tar.xz
+*.tar.xz.asc
+*.src.rpm
+*/*rpm
diff --git a/composer.json b/composer.json
index a317139..86e04d7 100644
--- a/composer.json
+++ b/composer.json
@@ -40,7 +40,7 @@
"symfony/property-info": "~2.8|~3.0|~4.0",
"symfony/phpunit-bridge": "~2.7|~3.0|~4.0",
"twig/twig": "~1.26|~2.0",
- "satooshi/php-coveralls": "^1.0",
+ "php-coveralls/php-coveralls": "^2.1",
"phpunit/phpunit": "^4.8.36|^5.7|^6.4",
"symfony/web-profiler-bundle": "~2.7|~3.0|~4.0"
},
@@ -59,7 +59,7 @@
},
"extra": {
"branch-alias": {
- "dev-master": "1.8.x-dev"
+ "dev-master": "1.9.x-dev"
}
}
}
diff --git a/php-doctrine-doctrine-bundle-get-source.sh b/php-doctrine-doctrine-bundle-get-source.sh
new file mode 100755
index 0000000..f8f69e8
--- /dev/null
+++ b/php-doctrine-doctrine-bundle-get-source.sh
@@ -0,0 +1,64 @@
+#/bin/sh
+
+GIT=`which git`
+RPM=`which rpm`
+
+if [ -z "$GIT" ]
+then
+ echo "ERROR: 'git' command not found" 1>&2
+ exit 1
+elif [ -z "$RPM" ]
+then
+ echo "ERROR: 'rpm' command not found" 1>&2
+ exit 1
+fi
+
+function print {
+ echo -e "\e[0;33m>>>>> ${1}\e[0m"
+}
+
+SPEC=`ls *.spec`
+NAME=`echo $SPEC | sed 's#\.spec##'`
+VERSION=`egrep '%global\s*github_version' $SPEC | awk '{print $3}'`
+
+print "SPEC = $SPEC"
+print "NAME = $NAME"
+
+GIT_OWNER=`egrep '%global\s*github_owner' $SPEC | awk '{print $3}'`
+GIT_NAME=`egrep '%global\s*github_name' $SPEC | awk '{print $3}'`
+GIT_COMMIT=`egrep '%global\s*github_commit' $SPEC | awk '{print $3}'`
+GIT_REPO=https://github.com/${GIT_OWNER}/${GIT_NAME}
+GIT_DIR=`echo $GIT_REPO | sed 's#.*/##'`
+
+print "GIT_OWNER = $GIT_OWNER"
+print "GIT_NAME = $GIT_NAME"
+print "GIT_COMMIT = $GIT_COMMIT"
+print "GIT_REPO = $GIT_REPO"
+print "GIT_DIR = $GIT_DIR"
+
+TEMP_DIR=$(mktemp --dir)
+TAR_FILE=$PWD/${NAME}-${VERSION}-${GIT_COMMIT}.tar.gz
+CMP_FILE=$PWD/composer.json
+
+pushd $TEMP_DIR
+ print "Cloning git repo..."
+ $GIT clone $GIT_REPO
+
+ pushd $GIT_DIR
+ print "Checking out commit..."
+ $GIT checkout $GIT_COMMIT
+ cp composer.json $CMP_FILE
+ popd
+
+ TAR_DIR=${GIT_NAME}-${GIT_COMMIT}
+ print "TAR_DIR = $TAR_DIR"
+
+ mv $GIT_DIR $TAR_DIR
+
+ print "TAR_FILE = $TAR_FILE"
+
+ [ -e $TAR_FILE ] && rm -f $TAR_FILE
+ tar --exclude-vcs -czf $TAR_FILE $TAR_DIR
+popd
+
+rm -rf $TEMP_DIR
diff --git a/php-doctrine-doctrine-bundle-vendor.patch b/php-doctrine-doctrine-bundle-vendor.patch
new file mode 100644
index 0000000..d3c9e13
--- /dev/null
+++ b/php-doctrine-doctrine-bundle-vendor.patch
@@ -0,0 +1,24 @@
+diff -up ./Tests/ProfilerTest.php.rpm ./Tests/ProfilerTest.php
+--- ./Tests/ProfilerTest.php.rpm 2019-01-08 08:34:53.547673232 +0100
++++ ./Tests/ProfilerTest.php 2019-01-08 08:35:26.067868176 +0100
+@@ -42,7 +42,7 @@ class ProfilerTest extends BaseTestCase
+ $this->collector->addLogger('foo', $this->logger);
+
+ $twigLoaderFilesystem = new Twig_Loader_Filesystem(__DIR__ . '/../Resources/views/Collector');
+- $twigLoaderFilesystem->addPath(__DIR__ . '/../vendor/symfony/web-profiler-bundle/Resources/views', 'WebProfiler');
++ $twigLoaderFilesystem->addPath('/usr/share/php/Symfony4/Bundle/WebProfilerBundle/Resources/views', 'WebProfiler');
+ $this->twig = new Twig_Environment($twigLoaderFilesystem, ['debug' => true, 'strict_variables' => true]);
+
+ $this->twig->addExtension(new CodeExtension('', '', ''));
+diff -up ./Tests/ServiceRepositoryTest.php.rpm ./Tests/ServiceRepositoryTest.php
+--- ./Tests/ServiceRepositoryTest.php.rpm 2019-01-08 08:31:26.000000000 +0100
++++ ./Tests/ServiceRepositoryTest.php 2019-01-08 08:34:53.547673232 +0100
+@@ -36,7 +36,7 @@ class ServiceRepositoryTest extends Test
+ public function testRepositoryServiceWiring()
+ {
+ // needed for older versions of Doctrine
+- AnnotationRegistry::registerFile(__DIR__ . '/../vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php');
++ AnnotationRegistry::registerFile('/usr/share/php/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php');
+
+ $container = new ContainerBuilder(new ParameterBag([
+ 'kernel.name' => 'app',
diff --git a/php-doctrine-doctrine-bundle.spec b/php-doctrine-doctrine-bundle.spec
index c04e9df..57abcfb 100644
--- a/php-doctrine-doctrine-bundle.spec
+++ b/php-doctrine-doctrine-bundle.spec
@@ -2,7 +2,7 @@
#
# Fedora spec file for php-doctrine-doctrine-bundle
#
-# Copyright (c) 2015-2017 Shawn Iwinski <shawn.iwinski@gmail.com>
+# Copyright (c) 2015-2019 Shawn Iwinski <shawn.iwinski@gmail.com>
#
# License: MIT
# http://opensource.org/licenses/MIT
@@ -12,8 +12,8 @@
%global github_owner doctrine
%global github_name DoctrineBundle
-%global github_version 1.9.1
-%global github_commit 703fad32e4c8cbe609caf45a71a1d4266c830f0f
+%global github_version 1.10.1
+%global github_commit 82d2c63cd09acbde2332f55d9aa7b28aefe4983d
%global composer_vendor doctrine
%global composer_project doctrine-bundle
@@ -80,36 +80,28 @@ BuildRequires:(php-composer(doctrine/doctrine-cache-bundle) >= %{cache_bundle_mi
BuildRequires:(php-composer(doctrine/orm) >= %{orm_min_ver} with php-composer(doctrine/orm) < %{orm_max_ver})
BuildRequires:(php-composer(jdorn/sql-formatter) >= %{sql_formatter_min_ver} with php-composer(jdorn/sql-formatter) < %{sql_formatter_max_ver})
BuildRequires:(php-composer(twig/twig) >= %{twig_min_ver} with php-composer(twig/twig) < %{twig_max_ver})
-# ensure same version of all components is used
-BuildRequires: php-symfony3-console
-BuildRequires: php-symfony3-dependency-injection
-BuildRequires: php-symfony3-doctrine-bridge
-BuildRequires: php-symfony3-framework-bundle
-BuildRequires: php-symfony3-property-info
-BuildRequires: php-symfony3-validator
-BuildRequires: php-symfony3-yaml
-BuildRequires: php-symfony3-web-profiler-bundle
%else
-BuildRequires: php-composer(doctrine/dbal) < %{dbal_min_ver}
+BuildRequires: php-composer(doctrine/dbal) < %{dbal_max_ver}
BuildRequires: php-composer(doctrine/dbal) >= %{dbal_min_ver}
-BuildRequires: php-composer(doctrine/doctrine-cache-bundle) < %{cache_bundle_min_ver}
+BuildRequires: php-composer(doctrine/doctrine-cache-bundle) < %{cache_bundle_max_ver}
BuildRequires: php-composer(doctrine/doctrine-cache-bundle) >= %{cache_bundle_min_ver}
-BuildRequires: php-composer(doctrine/orm) < %{orm_min_ver}
+BuildRequires: php-composer(doctrine/orm) < %{orm_max_ver}
BuildRequires: php-composer(doctrine/orm) >= %{orm_min_ver}
-BuildRequires: php-composer(jdorn/sql-formatter) < %{sql_formatter_min_ver}
+BuildRequires: php-composer(jdorn/sql-formatter) < %{sql_formatter_max_ver}
BuildRequires: php-composer(jdorn/sql-formatter) >= %{sql_formatter_min_ver}
BuildRequires: php-composer(phpunit/phpunit)
-BuildRequires: php-symfony-console
-BuildRequires: php-symfony-dependency-injection
-BuildRequires: php-symfony-doctrine-bridge
-BuildRequires: php-symfony-framework-bundle
-BuildRequires: php-symfony-property-info
-BuildRequires: php-symfony-validator
-BuildRequires: php-symfony-yaml
-BuildRequires: php-symfony-web-profiler-bundle
BuildRequires: php-composer(twig/twig) < %{twig_max_ver}
BuildRequires: php-composer(twig/twig) >= %{twig_min_ver}
%endif
+# ensure same version of all components is used
+BuildRequires: php-symfony4-console
+BuildRequires: php-symfony4-dependency-injection
+BuildRequires: php-symfony4-doctrine-bridge
+BuildRequires: php-symfony4-framework-bundle
+BuildRequires: php-symfony4-property-info
+BuildRequires: php-symfony4-validator
+BuildRequires: php-symfony4-yaml
+BuildRequires: php-symfony4-web-profiler-bundle
BuildRequires: php-composer(phpunit/phpunit)
## phpcompatinfo (computed from version 1.6.7)
BuildRequires: php-dom
@@ -161,7 +153,9 @@ Autoloader: %{phpdir}/Doctrine/Bundle/DoctrineBundle/autoload.php
%prep
%setup -qn %{github_name}-%{github_commit}
-%patch0 -p0
+%patch0 -p1 -b .rpm
+
+find . -name \*.rpm -delete -print
: Licenses and docs
mkdir -p .rpm/{docs,licenses}
@@ -188,28 +182,28 @@ require_once '%{phpdir}/Fedora/Autoloader/autoload.php';
'%{phpdir}/Doctrine/DBAL/autoload.php',
'%{phpdir}/jdorn-sql-formatter/autoload.php',
[
- '%{phpdir}/Symfony3/Bridge/Doctrine/autoload.php',
'%{phpdir}/Symfony4/Bridge/Doctrine/autoload.php',
+ '%{phpdir}/Symfony3/Bridge/Doctrine/autoload.php',
'%{phpdir}/Symfony/Bridge/Doctrine/autoload.php',
], [
- '%{phpdir}/Symfony3/Bundle/FrameworkBundle/autoload.php',
'%{phpdir}/Symfony4/Bundle/FrameworkBundle/autoload.php',
+ '%{phpdir}/Symfony3/Bundle/FrameworkBundle/autoload.php',
'%{phpdir}/Symfony/Bundle/FrameworkBundle/autoload.php',
], [
- '%{phpdir}/Symfony3/Component/Console/autoload.php',
'%{phpdir}/Symfony4/Component/Console/autoload.php',
+ '%{phpdir}/Symfony3/Component/Console/autoload.php',
'%{phpdir}/Symfony/Component/Console/autoload.php',
], [
- '%{phpdir}/Symfony3/Component/DependencyInjection/autoload.php',
'%{phpdir}/Symfony4/Component/DependencyInjection/autoload.php',
+ '%{phpdir}/Symfony3/Component/DependencyInjection/autoload.php',
'%{phpdir}/Symfony/Component/DependencyInjection/autoload.php',
]]);
\Fedora\Autoloader\Dependencies::optional([
'%{phpdir}/Doctrine/ORM/autoload.php',
[
- '%{phpdir}/Symfony3/Bundle/WebProfilerBundle/autoload.php',
'%{phpdir}/Symfony4/Bundle/WebProfilerBundle/autoload.php',
+ '%{phpdir}/Symfony3/Bundle/WebProfilerBundle/autoload.php',
'%{phpdir}/Symfony/Bundle/WebProfilerBundle/autoload.php',
], [
'%{phpdir}/Twig2/autoload.php',
@@ -254,6 +248,10 @@ exit $RETURN_CODE
%changelog
+* Tue Jan 8 2019 Remi Collet <remi@remirepo.net> - 1.10.1-1
+- update to 1.10.1
+- prefer symfony 4
+
* Wed Oct 17 2018 Remi Collet <remi@remirepo.net> - 1.9.1-1
- update to 1.9.1
- raise dependency on doctrine/dbal 2.5.12