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

self::ConstantName expression unrecognized #48

Open
pmaselkowski opened this issue Dec 6, 2018 · 1 comment
Open

self::ConstantName expression unrecognized #48

pmaselkowski opened this issue Dec 6, 2018 · 1 comment

Comments

@pmaselkowski
Copy link
Member

Error msg:

Error: Could not find class self, when processing annotations on Maslosoft\Fc\Tracker\Models\Project, near self::ValidatorPattern)
	 * @var string
	 */ while scanning file /www/fc/src/Tracker/Models/Project.php

Relevant code:

class Project extends MongoDocument
{
	const AllowedPattern = '\p{L}0-9-';
	const MatchPattern = '[' . self::AllowedPattern . ']+';
	const FullPattern = '^' . self::MatchPattern . '$';
	const ValidatorPattern = '~' . self::FullPattern . '~';

	/**
	 * @Label('Project Name')
	 * @RequiredValidator
	 * @UniqueValidator
	 * @ImmutableValidator
	 * @MatchValidator('pattern': self::ValidatorPattern)
	 * @var string
	 */
	public $name = '';
@pmaselkowski
Copy link
Member Author

This might be the case when class does not autoload. ie when Project is parsed with tokenizer, however it is not included nor included autoloader.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant