From 3aa4cbe7593ff0d95d99fccc43562d08c384be7d Mon Sep 17 00:00:00 2001 From: "Thomas A. Hirsch" Date: Thu, 22 Feb 2024 13:32:06 +0100 Subject: [PATCH 1/4] PHP 8.2 > Creation of dynamic property Class::$property is deprecated --- tests/DoctrineTest/Coverage.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/DoctrineTest/Coverage.php b/tests/DoctrineTest/Coverage.php index 4307124b0..1cfd6e247 100644 --- a/tests/DoctrineTest/Coverage.php +++ b/tests/DoctrineTest/Coverage.php @@ -46,6 +46,8 @@ class DoctrineTest_Coverage private $totalnotcovered = 0; private $result; + public $sortBy; + /* * Create a new Coverage object. We read data from a fixed file. */ From 8075a1e6b3e3a1228745045d6168997e2f40c08a Mon Sep 17 00:00:00 2001 From: "Thomas A. Hirsch" Date: Thu, 22 Feb 2024 13:32:15 +0100 Subject: [PATCH 2/4] Subversion is not used anymore --- tests/DoctrineTest/Coverage.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/DoctrineTest/Coverage.php b/tests/DoctrineTest/Coverage.php index 1cfd6e247..9af41a2bb 100644 --- a/tests/DoctrineTest/Coverage.php +++ b/tests/DoctrineTest/Coverage.php @@ -140,7 +140,8 @@ public function getRevision() */ public function generateReport() { - $svn_info = explode(" ", exec("svn info | grep Revision")); + // $svn_info = explode(" ", exec("svn info | grep Revision")); + $svn_info = 'svn is not used anymore. maybe adding some git infos or drop it?'; $this->result["revision"] = $svn_info[1]; //loop through all files and generate coverage files for them From af5c409364ac2f0aaf405e1e9453ab8320d70563 Mon Sep 17 00:00:00 2001 From: "Thomas A. Hirsch" Date: Thu, 22 Feb 2024 13:32:30 +0100 Subject: [PATCH 3/4] Avoid double-loading of sfYaml --- tests/DoctrineTest/Coverage.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/DoctrineTest/Coverage.php b/tests/DoctrineTest/Coverage.php index 9af41a2bb..c649e73d4 100644 --- a/tests/DoctrineTest/Coverage.php +++ b/tests/DoctrineTest/Coverage.php @@ -163,6 +163,10 @@ public function generateReport() continue; } + if (strpos($class, 'sfYaml')) { + continue; + } + if ( ! class_exists($class)) { continue; } From 21dbad3f5d0c41fd0d2e6b9f2e0c3e4d95ece589 Mon Sep 17 00:00:00 2001 From: "Thomas A. Hirsch" Date: Thu, 22 Feb 2024 13:52:17 +0100 Subject: [PATCH 4/4] Removed revision and triggered deprecation. --- tests/DoctrineTest/Coverage.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tests/DoctrineTest/Coverage.php b/tests/DoctrineTest/Coverage.php index c649e73d4..02909a900 100644 --- a/tests/DoctrineTest/Coverage.php +++ b/tests/DoctrineTest/Coverage.php @@ -115,11 +115,14 @@ public function showSummary() /** * Return the revision the coverage was made against * - *@param int The revision number + * @return int The revision number + * @deprecated Coverage revision is not supported anymore. */ public function getRevision() { - return $this->result["revision"]; + trigger_error('Coverage revision is not supported anymore.', E_USER_DEPRECATED); + + return 0; } /** @@ -140,10 +143,6 @@ public function getRevision() */ public function generateReport() { - // $svn_info = explode(" ", exec("svn info | grep Revision")); - $svn_info = 'svn is not used anymore. maybe adding some git infos or drop it?'; - $this->result["revision"] = $svn_info[1]; - //loop through all files and generate coverage files for them $it = new RecursiveDirectoryIterator(Doctrine_Core::getPath()); $notCoveredArray = array();