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

Wrong way of importing classes #18

Open
pmithrandir opened this issue Aug 25, 2014 · 3 comments
Open

Wrong way of importing classes #18

pmithrandir opened this issue Aug 25, 2014 · 3 comments

Comments

@pmithrandir
Copy link

Hello.

In the file TagFactory, you are using this method :
protected static function classnameFromTagname($tagname)

It's using datas coming from EXIF to generate the classname you are looking for. Here CreatorTool.

The issue is that in a picture I have, this CreatorTool is written Creatontool.(without the second uppercase on Tool).
Consequence, your software is looking for Creatortool class, which doesn't exist.

leading to this error.

Case mismatch between loaded and declared class names: PHPExiftool\Driver\Tag\XMPXmp\Creatortool vs PHPExiftool\Driver\Tag\XMPXmp\CreatorTool 

On windows, I cannot create a second file with no uppercase, the system find them as identical.
(not case sensitive)

I see 2 ways of resolving this issue :

  • to put all tagname in uppercase and to rename the class using the same way.(or to put everything lowercase except the first character, your choice)
  • to change this method to check if the file exist, and if not to look for similar file / class (no idea on how to do this one)

What is your feedback ?

Best regards,
Pierre

@pmithrandir
Copy link
Author

Hello.

Any update on this subject ?
I don't see a way to resolv this issue.

Or maybe to force uppercase / lowercase in all classes... which would mean a massive refactoring.

Best regards,
Pierre

@romainneutron
Copy link
Owner

Hello,

Your issue probably comes from exiftool. Exiftool should be consistent in metadata names. It seems it is not. We'll upgrade exiftool version soon

@pmithrandir
Copy link
Author

Hello,

I will wait for the update then.
Thank you,
Pierre

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