Closed Aboshxm2 closed 9 months ago
Is there any reason you must use a single-component namespace root? The namespace root must never be shared between two virions, so it is better to make it longer.
The virion 3.0 spec recommends against single-component namespace roots, and pharynx denies it directly.
Is there any reason you must use a single-component namespace root? The namespace root must never be shared between two virions, so it is better to make it longer.
The virion 3.0 spec recommends against single-component namespace roots, and pharynx denies it directly.
I am trying to convert a public php library (Carbon) to a pccketmine virion. It has dozens of files. It's really hard to change their namespaces.
@Aboshxm2 you don't just "convert a public php library to a virion" by adding an extra.virion
section in composer.json. By declaring that it is a virion, you confirm that you have checked that the library does not violate any of the rules required in the virion spec, including non-syntactic class references, use of global symbols and namespaces. This is why I recommend against converting public libraries to virions directly, because their maintainers will not guarantee any of these rules.
Code Sample
Command:
%PHP_BINARY% -dphar.readonly=0 pharynx.phar -c -i %PLUGIN_PATH% -p=%PLUGIN_PATH%\out\%PLUGIN_NAME%.phar
Output: