Skip to content

Commit

Permalink
qa: adds @todo annotations to mark items to change/remove when no l…
Browse files Browse the repository at this point in the history
…onger supporting Composer 1.X

Signed-off-by: Matthew Weier O'Phinney <matthew@weierophinney.net>
  • Loading branch information
weierophinney committed Jul 13, 2020
1 parent b4a7c0e commit b7fb80f
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/AssetInstaller.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public function setProjectPath($path)
}

/**
* @todo Add explicit typehint for version 2.0.
* @param PackageInterface $package
*/
public function __invoke(/*PackageInterface*/ $package)
Expand Down Expand Up @@ -191,10 +192,9 @@ private function updateGitignore($gitignoreFile, $path)

/**
* @param PackageInterface $package
*
* @return PackageInterface
* @deprecated Can be removed with next major.
* Migration guide should suggest upgrading to latest minor before upgrading major
* @deprecated Can be removed with next major. Migration guide should
* suggest upgrading to latest minor before upgrading major.
*/
private function package($package)
{
Expand Down
6 changes: 3 additions & 3 deletions src/AssetUninstaller.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public function setProjectPath($path)
}

/**
* @todo Add explicit typehint for version 2.0.
* @param PackageInterface $package
*/
public function __invoke(/*PackageInterface*/ $package)
Expand Down Expand Up @@ -198,10 +199,9 @@ private function fetchIgnoreRules($file)

/**
* @param PackageInterface $package
*
* @return PackageInterface
* @deprecated Can be removed with next major.
* Migration guide should suggest upgrading to latest minor before upgrading major
* @deprecated Can be removed with next major. Migration guide should
* suggest upgrading to latest minor before upgrading major.
*/
private function package($package)
{
Expand Down
7 changes: 7 additions & 0 deletions test/AssetInstallerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,9 @@ public function testInstallerAllowsConfigurationContainingClassPseudoConstant()
}
}

/**
* @todo Remove for version 2.0, when support for Composer 1.0 is removed.
*/
public function testInstallerCanHandlePackageEventWithInstallOperationDuringMigration()
{
if (version_compare(PluginInterface::PLUGIN_API_VERSION, '2.0', 'gte')) {
Expand Down Expand Up @@ -353,6 +356,9 @@ public function testInstallerCanHandlePackageEventWithInstallOperationDuringMigr
$this->assertNull($installer($packageEvent->reveal()));
}

/**
* @todo Remove for version 2.0, when support for Composer 1.0 is removed.
*/
public function testInstallerCanHandlePackageEventWithUpdateOperationDuringMigration()
{
if (version_compare(PluginInterface::PLUGIN_API_VERSION, '2.0', 'gte')) {
Expand Down Expand Up @@ -386,6 +392,7 @@ public function testInstallerCanHandlePackageEventWithUpdateOperationDuringMigra
}

/**
* @todo Remove for version 2.0, when support for Composer 1.0 is removed.
* @return ObjectProphecy
*/
private function createPackageEvent(OperationInterface $operation)
Expand Down
4 changes: 4 additions & 0 deletions test/AssetUninstallerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,9 @@ public function testUninstallerSkipsConfigFilesThatDoNotContainAssetManagerStrin
}
}

/**
* @todo Remove for version 2.0, when support for Composer 1.0 is removed.
*/
public function testUninstallerCanHandlePackageEventDuringMigration()
{
if (version_compare(PluginInterface::PLUGIN_API_VERSION, '2.0', 'gte')) {
Expand All @@ -412,6 +415,7 @@ public function testUninstallerCanHandlePackageEventDuringMigration()
}

/**
* @todo Remove for version 2.0, when support for Composer 1.0 is removed.
* @return ObjectProphecy
*/
private function createPackageEvent(OperationInterface $operation)
Expand Down

0 comments on commit b7fb80f

Please sign in to comment.