Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sub-dependencies are not processed correctly. #75

Closed
rilwis opened this issue Oct 20, 2020 · 3 comments
Closed

Sub-dependencies are not processed correctly. #75

rilwis opened this issue Oct 20, 2020 · 3 comments

Comments

@rilwis
Copy link

rilwis commented Oct 20, 2020

I'm trying to change the namespace for Twig and here is my composer.json:

"mozart": {
	"dep_namespace": "MBViews\\Dependencies\\",
	"dep_directory": "/src/Dependencies/",
	"classmap_directory": "/classes/dependencies/",
	"classmap_prefix": "MBV_",
	"packages": [
		"twig/twig"
	],
	"override_autoload": {},
	"delete_vendor_directories": true
}

And here is the screenshot of the Dependencies folder, which looks quite right. Twig and Symfony packages are moved correctly.

image

However, inside the Dependencies/Symfony/Polyfill/Mbstring/bootstrap.php file, there's are lines like this:

use Symfony\Polyfill\Mbstring as p;

if (!function_exists('mb_convert_encoding')) {
    function mb_convert_encoding($s, $to, $from = null) { return p\Mbstring::mb_convert_encoding($s, $to, $from); }
}

// More lines

Note the use statement here. It should prepended with our configuration in the composer.json, which should be MBViews\Dependencies\Symfony\Polyfill\Mbstring.

Currently, I manual change it, because there're only 2 packages from Symfony need to change. But if there're many packages, the work will be huge.

@coenjacobs
Copy link
Owner

@rilwis Can you perhaps try again with the current master branch, now that some of the more matured recursive package fixes have been merged, so I expect this to be fixed. If not, could you please provide your entire composer.json file here?

@rilwis
Copy link
Author

rilwis commented Jan 29, 2021

@coenjacobs I just got a chance to try mozart again and looks like this issue is fixed!

Thanks for your library.

@rilwis rilwis closed this as completed Jan 29, 2021
@coenjacobs
Copy link
Owner

Glad to hear that @rilwis - happy it's serving you well!

szepeviktor pushed a commit to szepeviktor/BrianHenryIE_mozart that referenced this issue Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants