You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.
Fatal error: Class 'Zend\ServiceManager\AbstractPluginManager' not found
in .../vendor/zendframework/zend-barcode/src/ObjectPluginManager.php on line 22
"suggest": {
"zendframework/zend-servicemanager": "Zend\\ServiceManager component, required when using the factory methods of Zend\\Barcode.",
"zendframework/zendpdf": "ZendPdf component"
},
so I used another example, without ::factory, but there was still the same error:
Fatal error: Class 'Zend\ServiceManager\AbstractPluginManager' not found
in .../vendor/zendframework/zend-barcode/src/ObjectPluginManager.php on line 22
This issue was fixed by modifying my composer.json by adding "zendframework/zend-servicemanager": "^2.5" in the require section.
My example code:
<?php
error_reporting(E_ALL);
ini_set('display_errors', 'On');
require'vendor/autoload.php';
// Only the text to draw is required$barcodeOptions = array('text' => 'ZEND-FRAMEWORK');
// No required options$rendererOptions = array();
// Draw the barcode in a new image,// send the headers and the imageZend\Barcode\Barcode::render(
'code39', 'image', $barcodeOptions, $rendererOptions
);
Hello :-)
I was testing the examples shown on http://framework.zend.com/manual/current/en/modules/zend.barcode.creation.html but I was getting:
I've checked https://github.com/zendframework/zend-barcode/blob/master/composer.json and found:
so I used another example, without
::factory
, but there was still the same error:This issue was fixed by modifying my
composer.json
by adding"zendframework/zend-servicemanager": "^2.5"
in therequire
section.My example code:
and the fixed
composer.json
:The text was updated successfully, but these errors were encountered: