diff options
| author | Remi Collet <remi@remirepo.net> | 2017-11-09 10:50:36 +0100 | 
|---|---|---|
| committer | Remi Collet <remi@remirepo.net> | 2017-11-09 10:50:36 +0100 | 
| commit | a16d22d5eec3f599d6b1762996cff327e0032d8f (patch) | |
| tree | f6db978d1b77be027ef99ff19f2a52e42241de7f | |
| parent | 09f3b91a4e1fe5357c052b4f241596c9a4a4d17a (diff) | |
fix FTBFS from Koschei, add patch for PHP 7.2
| -rw-r--r-- | php-nette-deprecated-php72.patch | 44 | ||||
| -rw-r--r-- | php-nette-deprecated.spec | 8 | 
2 files changed, 51 insertions, 1 deletions
diff --git a/php-nette-deprecated-php72.patch b/php-nette-deprecated-php72.patch new file mode 100644 index 0000000..4e01bf5 --- /dev/null +++ b/php-nette-deprecated-php72.patch @@ -0,0 +1,44 @@ +Fix for PHP 7.2 + +diff -ru old/Callback.php src/Callback.php +--- src/Callback.php	2017-11-09 10:29:37.999024003 +0100 ++++ src/Callback.php	2017-11-09 10:39:51.600295131 +0100 +@@ -13,8 +13,11 @@ + /** +  * @deprecated +  */ +-class Callback extends Object ++class Callback + { ++    use \Nette\SmartObject; ++ ++ + 	/** @var callable */ + 	private $cb; +  +diff -ru old/Templating/Template.php src/Templating/Template.php +--- src/Templating/Template.php	2017-11-09 10:29:38.000024009 +0100 ++++ src/Templating/Template.php	2017-11-09 10:39:13.758095759 +0100 +@@ -16,8 +16,12 @@ + /** +  * @deprecated +  */ +-class Template extends Nette\Object implements ITemplate ++class Template implements ITemplate + { ++    use \Nette\SmartObject {  ++        \Nette\SmartObject::__call as __parent_call; ++    } ++ + 	/** @var array of function (Template $sender); Occurs before a template is compiled - implement to customize the filters */ + 	public $onPrepareFilters = array(); +  +@@ -311,7 +315,7 @@ + 					return Callback::invokeArgs($this->helpers[$lname], $args); + 				} + 			} +-			return parent::__call($name, $args); ++			return $this->__parent_call($name, $args); + 		} +  + 		return Callback::invokeArgs($this->helpers[$lname], $args); diff --git a/php-nette-deprecated.spec b/php-nette-deprecated.spec index 4dd62b4..843e76b 100644 --- a/php-nette-deprecated.spec +++ b/php-nette-deprecated.spec @@ -18,7 +18,7 @@  Name:           php-%{gh_owner}-%{gh_project}  Version:        2.4.1 -%global specrel 1 +%global specrel 2  Release:        %{?gh_date:1%{specrel}.%{?prever}%{!?prever:%{gh_date}git%{gh_short}}}%{!?gh_date:%{specrel}}%{?dist}  Summary:        APIs and features removed from Nette Framework @@ -29,6 +29,8 @@ Source0:        %{name}-%{version}-%{gh_short}.tgz  # pull a git snapshot to get test sutie  Source1:        makesrc.sh +Patch0:         %{name}-php72.patch +  BuildArch:      noarch  BuildRequires:  php-composer(theseer/autoload)  %if %{with_tests} @@ -79,6 +81,7 @@ To use this library, you just have to add, in your project:  %prep  %setup -q -n %{gh_project}-%{gh_commit} +%patch0 -p0  mkdir src/%{ns_project} @@ -145,6 +148,9 @@ exit $ret  %changelog +* Thu Nov  9 2017 Remi Collet <remi@remirepo.net> - 2.4.1-2 +- fix FTBFS from Koschei, add patch for PHP 7.2 +  * Sun Aug  6 2017 Remi Collet <remi@remirepo.net> - 2.4.1-1  - Update to 2.4.1  | 
