Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Implement JVM by PHP",
"type": "library",
"license": "MIT",
"version": "0.0.9.0-dev",
"minimum-stability": "dev",
"authors": [
{
"name": "memory"
Expand All @@ -15,12 +15,12 @@
"require": {
"php": ">=7.3",
"ext-zip": "*",
"monolog/monolog": "^1.24",
"monolog/monolog": "^2.2",
"gabrielelana/byte-units": "^0.5.0",
"symfony/console": "^4.2",
"phpdocumentor/reflection-docblock": "^4.3",
"brick/math": "^0.8.8",
"nikic/php-parser": "^4.2"
"symfony/console": "^5.2",
"phpdocumentor/reflection-docblock": "^5.2",
"brick/math": "^0.9.1",
"nikic/php-parser": "^4.10"
},
"autoload": {
"psr-4": {
Expand All @@ -34,10 +34,10 @@
}
},
"require-dev": {
"phpunit/phpunit": "^8.0",
"squizlabs/php_codesniffer": "^3.4",
"friendsofphp/php-cs-fixer": "^2.14",
"brainmaestro/composer-git-hooks": "^2.6"
"phpunit/phpunit": "^9.5",
"squizlabs/php_codesniffer": "^3.5",
"friendsofphp/php-cs-fixer": "^2.17",
"brainmaestro/composer-git-hooks": "^2.8"
},
"scripts": {
"test": "phpunit",
Expand Down
6 changes: 0 additions & 6 deletions src/Compiler/Lang/Assembler/Bundler/Packages/Constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,6 @@ class Constants extends AbstractPackageBundler implements PackageBundlerInterfac
*/
const PHP_VERSION_ID = PHP_VERSION_ID;

/**
* @var
* @export
*/
const PHP_EXTRA_VERSION = PHP_EXTRA_VERSION;

/**
* @var \PHPJava\Packages\java\lang\String_
* @export
Expand Down
3 changes: 3 additions & 0 deletions src/Core/JavaArchive.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ public function __construct(string $jarFile, array $options = [])
if (empty($attribute)) {
continue;
}
if (strpos($attribute, ':') === false) {
continue;
}
[$name, $value] = explode(':', $attribute);
$this->manifestData[strtolower($name)] = trim($value);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Kernel/Mnemonics/_ldc_w.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function execute(): void
} elseif ($data instanceof Float_) {
$value = \PHPJava\Kernel\Types\Float_::get($data->getBytes());
} else {
$value = $cpInfo[$data->getStringIndex()];
$value = $cpInfo[$data->getClassIndex()];
}

$this->pushToOperandStack($value);
Expand Down
4 changes: 2 additions & 2 deletions tests/Cases/Compiler/MagicConstantTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function testMagicConstDir()
{
[$output, $return] = $this->runJavaTest(__METHOD__);

$this->assertRegExp(
$this->assertMatchesRegularExpression(
'#php-java/tests/Cases/Compiler/Codes$#',
$output[0]
);
Expand All @@ -52,7 +52,7 @@ public function testMagicConstFile()
{
[$output, $return] = $this->runJavaTest(__METHOD__);

$this->assertRegExp(
$this->assertMatchesRegularExpression(
'#php-java/tests/Cases/Compiler/Codes/TestMagicConstFile.php$#',
$output[0]
);
Expand Down