Skip to content

Commit 1a482f5

Browse files
committed
minor #981 fix: deprecations triggered by debug class loader (shyim)
This PR was submitted for the 2.x branch but it was merged into the 1.x branch instead. Discussion ---------- fix: deprecations triggered by debug class loader Fixes following errors: ``` 21:05:05 INFO [php] User Deprecated: Method "Composer\Plugin\PluginInterface::activate()" might add "void" as a native return type declaration in the future. Do the same in implementation "Symfony\Flex\Flex" now to avoid errors or add an explicit `@return` annotation to suppress this message. 21:05:05 INFO [php] User Deprecated: Method "Composer\Plugin\PluginInterface::deactivate()" might add "void" as a native return type declaration in the future. Do the same in implementation "Symfony\Flex\Flex" now to avoid errors or add an explicit `@return` annotation to suppress this message. 21:05:05 INFO [php] User Deprecated: Method "Composer\Plugin\PluginInterface::uninstall()" might add "void" as a native return type declaration in the future. Do the same in implementation "Symfony\Flex\Flex" now to avoid errors or add an explicit `@return` annotation to suppress this message. 21:05:05 INFO [php] User Deprecated: Method "JsonSerializable::jsonSerialize()" might add "mixed" as a native return type declaration in the future. Do the same in implementation "Symfony\Flex\Response" now to avoid errors or add an explicit `@return` annotation to suppress this message. 21:05:05 INFO [php] User Deprecated: Method "Composer\DependencyResolver\Operation\OperationInterface::getOperationType()" might add "string" as a native return type declaration in the future. Do the same in implementation "Symfony\Flex\InformationOperation" now to avoid errors or add an explicit `@return` annotation to suppress this message. 21:05:05 INFO [php] User Deprecated: Method "Composer\DependencyResolver\Operation\OperationInterface::show()" might add "string" as a native return type declaration in the future. Do the same in implementation "Symfony\Flex\InformationOperation" now to avoid errors or add an explicit `@return` annotation to suppress this message. ``` Commits ------- 67ddf63 fix: deprecations triggered by debug class loader
2 parents 039bb47 + 67ddf63 commit 1a482f5

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

src/Flex.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ class Flex implements PluginInterface, EventSubscriberInterface
104104
];
105105
private $filter;
106106

107+
/**
108+
* @return void
109+
*/
107110
public function activate(Composer $composer, IOInterface $io)
108111
{
109112
if (!\extension_loaded('openssl')) {
@@ -291,6 +294,9 @@ class_exists(__NAMESPACE__.str_replace('/', '\\', substr($file, \strlen(__DIR__)
291294
}
292295
}
293296

297+
/**
298+
* @return void
299+
*/
294300
public function deactivate(Composer $composer, IOInterface $io)
295301
{
296302
self::$activated = false;
@@ -594,6 +600,9 @@ private function synchronizePackageJson(string $rootDir)
594600
}
595601
}
596602

603+
/**
604+
* @return void
605+
*/
597606
public function uninstall(Composer $composer, IOInterface $io)
598607
{
599608
$this->lock->delete();

src/InformationOperation.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ public function getJobType()
5757

5858
/**
5959
* {@inheritdoc}
60+
*
61+
* @return string
6062
*/
6163
public function getOperationType()
6264
{
@@ -65,6 +67,8 @@ public function getOperationType()
6567

6668
/**
6769
* {@inheritdoc}
70+
*
71+
* @return string
6872
*/
6973
public function show($lock)
7074
{

src/Response.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ public static function fromJson(array $json): self
6565
return $response;
6666
}
6767

68+
/**
69+
* @return mixed
70+
*/
6871
#[\ReturnTypeWillChange]
6972
public function jsonSerialize()
7073
{

0 commit comments

Comments
 (0)