Browse Source

Provide default impl for abstract method in interface for PHP < 5.3.9 (#8837)

Nils Adermann 4 years ago
parent
commit
994a5b41c2
1 changed files with 6 additions and 3 deletions
  1. 6 3
      src/Composer/DependencyResolver/Operation/SolverOperation.php

+ 6 - 3
src/Composer/DependencyResolver/Operation/SolverOperation.php

@@ -45,7 +45,10 @@ abstract class SolverOperation implements OperationInterface
 
     /**
      * @param $lock bool Whether this is an operation on the lock file
-    * @return string
-    */
-    abstract public function show($lock);
+     * @return string
+     */
+    public function show($lock)
+    {
+        throw new \RuntimeException('abstract method needs to be implemented in subclass, not marked abstract for compatibility with PHP <= 5.3.8');
+    }
 }