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

zend-validate fix issue: File "Intelligentmail.php" does not exist #336

Merged
merged 2 commits into from
Apr 4, 2023

Conversation

hungtrinh
Copy link

Problem

On case sensitive file name system (linux) code bellow

new Zend_Validate_Barcode('intelligentmail');

will raise exception not found file Zend/Validate/Validate/Barcode/Intelligentmail.php

Logic load barcode $adapter file here

$adapter = ucfirst(strtolower($adapter));
require_once 'Zend/Loader.php';
if (Zend_Loader::isReadable('Zend/Validate/Barcode/' . $adapter. '.php')) {
$adapter = 'Zend_Validate_Barcode_' . $adapter;
}
if (!class_exists($adapter)) {
Zend_Loader::loadClass($adapter);
}

Root cause

What in PR

Reopen test case Zend_Validate_BarcodeTest.php::testINTELLIGENTMAIL - https://github.com/hungtrinh/zf1-future/actions/runs/4434747808/jobs/7781048143#step:10:261

Fix above bug by: https://github.com/hungtrinh/zf1-future/actions/runs/4434966231/jobs/7781528244

  • Correctly class name to Zend_Validate_Barcode_Intelligentmail
  • Rollback file name from IntelligentMail.php to Intelligentmail.php

Ref

@hungtrinh
Copy link
Author

Mr @glensc could you please review this PR

@hungtrinh
Copy link
Author

Mr @Shardj could you please review this PR?

@glensc
Copy link
Collaborator

glensc commented Apr 4, 2023

There are more renames in d822ef1 commit, are the others fixed?

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

Successfully merging this pull request may close these issues.

2 participants