Merge pull request #5393 from mlocati/eval-strict-types
Strip out declare strict_types from pluginspull/5418/head
commit
5ae816d508
|
@ -190,7 +190,8 @@ class PluginManager
|
|||
$code = str_replace('__FILE__', var_export($path, true), $code);
|
||||
$code = str_replace('__DIR__', var_export(dirname($path), true), $code);
|
||||
$code = str_replace('__CLASS__', var_export($class, true), $code);
|
||||
eval('?>'.$code);
|
||||
$code = preg_replace('/^\s*<\?(php)?/i', '', $code, 1);
|
||||
eval($code);
|
||||
$class .= '_composer_tmp'.self::$classCounter;
|
||||
self::$classCounter++;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types = 1);
|
||||
|
||||
namespace Installer;
|
||||
|
||||
use Composer\Composer;
|
||||
use Composer\IO\IOInterface;
|
||||
use Composer\Plugin\PluginInterface;
|
||||
|
||||
class Plugin implements PluginInterface
|
||||
{
|
||||
public $version = 'installer-v9';
|
||||
|
||||
public function activate(Composer $composer, IOInterface $io)
|
||||
{
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"name": "plugin-v9",
|
||||
"version": "9.0.0",
|
||||
"type": "composer-plugin",
|
||||
"autoload": { "psr-0": { "Installer": "" } },
|
||||
"extra": {
|
||||
"class": "Installer\\Plugin"
|
||||
},
|
||||
"require": {
|
||||
"composer-plugin-api": "^1.0"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue