mozart icon indicating copy to clipboard operation
mozart copied to clipboard

Unexpected prefixing of "for" in PHP Docblock/comments

Open remyperona opened this issue 4 years ago • 2 comments

  • Using v0.7

Bug description After updating to version 0.7 and running the compose command, I noticed that the word for was prefixed with the classmap_prefix_ defined in the composer configuration, for our dependencies using classmap.

As an example, here is an original docblock:

/**
 * Maybe handle
 *
 * Check for correct nonce and pass to handler.
 */

and the resulting one:

/**
 * Maybe handle
 *
 * Check Prefix_for correct nonce and pass to handler.
 */

It also did the same thing inside inline comments: // If positive match is found, store the results for debug. // If positive match is found, store the results Prefix_for debug.

I didn't see any other word on which this happened.

It's not breaking anything as far as I can see, but something for you to look into. And fixing it will also prevent unexpected diff on our repos when updating dependencies.

remyperona avatar Feb 02 '21 15:02 remyperona

Presumably fixed by #102

BrianHenryIE avatar Feb 02 '21 17:02 BrianHenryIE

getting same thing with to

image

	"extra": {
		"mozart": {
			"dep_namespace": "MyVendor\\Dependencies\\",
			"dep_directory": "/Dependencies/",
			"classmap_directory": "/Dependencies/autoload/",
			"classmap_prefix": "EECD_",
			"packages": [
				"dompdf/dompdf",
				"endyjasmi/cuid",
				"tijsverkoyen/css-to-inline-styles",
				"jaybizzle/crawler-detect",
				"wp-graphql/wp-graphql"
			],
			"delete_vendor_directories": true
		}
	},
	"scripts": {
		"post-install-cmd": [
			"\"vendor/bin/mozart\" compose",
			"composer dump-autoload"
		],
		"post-update-cmd": [
			"\"vendor/bin/mozart\" compose",
			"composer dump-autoload"
		]
	}

tn3rb avatar Apr 26 '23 20:04 tn3rb