"res/schema.json" does not exist in Assert.php on line 2074
Cvar1984 opened this issue ยท 8 comments
Bug report
Question | Answer |
---|---|
Box version | "humbug/box": "^3.8" |
PHP version | PHP 8.2.10 (cli) (built: Sep 2 2023 01:32:24) (NTS) |
Platform with version | Linux Artix 6.5.2-artix1-1 # 1 SMP PREEMPT_DYNAMIC Fri, 08 Sep 2023 13:16:06 +0000 x86_64 GNU/Linux |
Composer version | 2.6.3 2023-09-15 09:38:21 |
Project link | https://github.com/cvar1984/yapo |
installing from composer and return schema.json does not exist. this never happens before in past 3 years
box.json.dist
{
"alias": "main.phar",
"chmod": "0755",
"finder": [
{
"name": ["*"],
"exclude": ["test","tests","example","examples"],
"in": ["vendor","src"]
}
],
"main": "main.php",
"output": "bin/yapo",
"stub": true,
"algorithm": "SHA512",
"compression": "GZ"
}
Output
$ vendor/bin/box compile
> Box version 3.14.1@efdf63b
// Loading the configuration file "/home/cvar1984/yapo/box.json".
[ERROR] The configuration file is invalid.
In Assert.php line 2074:
The file "/home/cvar1984/yapo/vendor/humbug/box/src/Console/../../res/schema.json" does not exist.
@Cvar1984 I admit I'm quite confused, do you have a reproducer?
git clone https://github.com/cvar1984/yapo
cd yapo
composer install
vendor/bin/box compile
worked for me. The error message is quite confusing as well because if you do browser the files for that release the file can be found at that path. The release notes and the ones around this version don't hint on any change about this either.
I would also point out that 3.14.1 is over 1.5y old, the latest release being 4.3.8.
yeah the error is very confusing i ommit this config to make it works for 4.3.8@5534406 but the phar i download from release shows different result from which i download using a composer https://asciinema.org/a/zalNEXi9aWZGLrGtrw5UFwnjT
Is there any reason why the file would not be present:
$ composer require humbug/box <- installs 4.3.8
$ ls -l vendor/humbug/box/src/Configuration/../../res/schema.json <- the file exists
if you delete your vendor and install it again does it consistently shows that vendor/humbug/box/res
does not contain schema.json
?
Is there any reason why the file would not be present:
$ composer require humbug/box <- installs 4.3.8 $ ls -l vendor/humbug/box/src/Configuration/../../res/schema.json <- the file exists
if you delete your vendor and install it again does it consistently shows that
vendor/humbug/box/res
does not containschema.json
?
its still not presented i have tried using another version its the same but the phars is not problem
Box version 4.3.8@5534406
vendor/humbug/box/
โโโ bin
โ โโโ box
โ โโโ box.bat
โ โโโ generate_default_stub
โโโ composer.json
โโโ LICENSE
โโโ src
โโโ Amp
โ โโโ FailureCollector.php
โโโ Annotation
โ โโโ CompactedFormatter.php
โ โโโ DocblockAnnotationParser.php
โ โโโ MalformedTagException.php
โโโ Box.php
โโโ Compactor
โ โโโ BaseCompactor.php
โ โโโ Compactor.php
โ โโโ Compactors.php
โ โโโ FileExtensionCompactor.php
โ โโโ Json.php
โ โโโ Php.php
โ โโโ PhpScoper.php
โ โโโ Placeholder.php
โโโ Composer
โ โโโ ComposerConfiguration.php
โ โโโ ComposerFile.php
โ โโโ ComposerFiles.php
โ โโโ ComposerOrchestrator.php
โ โโโ IncompatibleComposerVersion.php
โโโ Configuration
โ โโโ ConfigurationLoader.php
โ โโโ ConfigurationLogger.php
โ โโโ Configuration.php
โ โโโ ExportableConfiguration.php
โ โโโ NoConfigurationFound.php
โโโ Console
โ โโโ Application.php
โ โโโ Command
โ โ โโโ ChangeWorkingDirOption.php
โ โ โโโ Compile.php
โ โ โโโ ConfigOption.php
โ โ โโโ ConfigurationExporter.php
โ โ โโโ Diff.php
โ โ โโโ Extract.php
โ โ โโโ GenerateDockerFile.php
โ โ โโโ Info.php
โ โ โโโ Namespace_.php
โ โ โโโ Process.php
โ โ โโโ Validate.php
โ โ โโโ Verify.php
โ โโโ ConfigurationLoader.php
โ โโโ ConfigurationLocator.php
โ โโโ Logger
โ โ โโโ CompilerLogger.php
โ โโโ Logo.php
โ โโโ MessageRenderer.php
โ โโโ OutputFormatterConfigurator.php
โ โโโ PharInfoRenderer.php
โ โโโ Php
โ โโโ PhpSettingsHandler.php
โโโ consts.php
โโโ DockerFileGenerator.php
โโโ FileSystem
โ โโโ file_system.php
โ โโโ FileSystem.php
โโโ functions.php
โโโ Json
โ โโโ Json.php
โ โโโ JsonValidationException.php
โโโ MapFile.php
โโโ NotInstantiable.php
โโโ Phar
โ โโโ CompressionAlgorithm.php
โ โโโ PharPhpSettings.php
โโโ Pharaoh
โ โโโ Pharaoh.php
โ โโโ PharDiff.php
โ โโโ PharError.php
โโโ PharInfo
โ โโโ PharDiff.php
โ โโโ PharInfo.php
โโโ PhpScoper
โ โโโ ExcludedFilesScoper.php
โ โโโ NullScoper.php
โ โโโ PatcherFactory.php
โ โโโ Scoper.php
โ โโโ SerializablePatcher.php
โ โโโ SerializableScoper.php
โโโ RequirementChecker
โ โโโ AppRequirementsFactory.php
โ โโโ DecodedComposerJson.php
โ โโโ DecodedComposerLock.php
โ โโโ PackageInfo.php
โ โโโ RequiredItem.php
โ โโโ Requirement.php
โ โโโ RequirementsDumper.php
โโโ StubGenerator.php
โโโ Test
โโโ CommandTestCase.php
โโโ FileSystemTestCase.php
โโโ RequiresPharReadonlyOff.php
20 directories, 82 files
It's very curious, I mean it is missing so much, there is not the res
directory, not the composer.lock
, not the docs or tests directory either.
If I do:
mkdir tmp && cd tmp
echo '{}' > composer.json
composer require humbug/box
tree vendor/humbug/box
Then I get 176 directories, 594 files
. There is really a lot more. So I'm wondering how come you are missing all of that
It's very curious, I mean it is missing so much, there is not the
res
directory, not thecomposer.lock
, not the docs or tests directory either.If I do:
mkdir tmp && cd tmp echo '{}' > composer.json composer require humbug/box tree vendor/humbug/box
Then I get
176 directories, 594 files
. There is really a lot more. So I'm wondering how come you are missing all of that
i clean up composer cache and i did the same as you did but i still got the same result 20 directories, 82 files
using Composer version 2.6.3 2023-09-15 09:38:21
its so weird
Someone suggested this could be the result of a plugin such as https://github.com/dg/composer-cleaner.
By any chance do you have any plugin install either at the project level or globally?
Someone suggested this could be the result of a plugin such as https://github.com/dg/composer-cleaner.
By any chance do you have any plugin install either at the project level or globally?
i never know i got that package installed globally, yes i think this is the issue