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

Composer issues and class not found #18

Closed
gboddin opened this issue Sep 1, 2015 · 8 comments
Closed

Composer issues and class not found #18

gboddin opened this issue Sep 1, 2015 · 8 comments

Comments

@gboddin
Copy link

gboddin commented Sep 1, 2015

I cannot get this library to work, steps to reproduce :

  • create a new project dir
  • run composer require 'confirm-it-solutions/php-zabbix-api:2.4.2'
  • create test.php with the following content :
<?php
require 'vendor/autoload.php';
use ZabbixApi\ZabbixApi;
$test = new ZabbixApi();

or

<?php
require 'vendor/autoload.php';
$test = new \ZabbixApi\ZabbixApi();

Result is :

PHP Fatal error:  Class 'ZabbixApi\ZabbixApi' not found in /home/boddigr/Projects/new/index.php on line 4
PHP Stack trace:
PHP   1. {main}() /home/boddigr/Projects/new/index.php:0

php & composer info :

PHP 5.6.12-1 (cli) 
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
    with Xdebug v2.3.3, Copyright (c) 2002-2015, by Derick Rethans

Composer version 1.0-dev (afd98b74f13b9def1b2447f16fd0bfd4d96dff94) 2015-08-31 09:58:50
@DavidBadura
Copy link

see #19

@domibarton
Copy link
Member

should be working with the latest 2.2 and 2.4 dev branches...
@DavidBadura @gboddin can you test it and give me a feedback? I no longer use the API myself... ;)

@hupsil
Copy link

hupsil commented Oct 14, 2015

Tested on 2.2 dev and it is working correctly now.

@gboddin
Copy link
Author

gboddin commented Oct 16, 2015

Thanks for the fix ! :)

@narigua
Copy link

narigua commented Nov 4, 2015

Hi all !
I want to use it in my symfony project, but i have the same problem.
Tested with dev, 2.4.2 and 2.2.2.
Unable to find namespace.

Any ideas ?
Thanks.

@narigua
Copy link

narigua commented Nov 4, 2015

Rectification !
It works with 2.4.x-dev.
Maybe for next version ?

@gboddin
Copy link
Author

gboddin commented Nov 4, 2015

@domibarton Can I suggest using a 2.4.2.1 tag ?

That way, using "^2.4.2" in your composer.json would still make sure you're running against the version of Zabbix you're working with and still get updates and bug fixes.

Then we can close the issue I think :)

@domibarton
Copy link
Member

Hi there.

I created new tags / releases:

  • v2.2.3
  • v2.4.3

@gboddin I think we shouldn't change the tag version numbers and I don't think we should (re)move existing tags to keep up to date. If you want to stay on the latest 2.4 changes you should use the 2.4 branch instead of tags. IMHO that's the "nature of git" ;)

However we can think about a proper git (work)flow with proper release branches etc.

Cheers
Domi

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

5 participants