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

[BUG]: Class 'Phalcon\Version' not found in C:\wamp64\www\phal\vendor\phalcon\devtools\bootstrap\autoload.php:134 #1515

Closed
imakepossible opened this issue Jul 9, 2021 · 9 comments
Assignees
Milestone

Comments

@imakepossible
Copy link

Questions?
i have installed Phalcon version 5.0.0alpha3 on window and it is showing in phpinfo and in php --m
but when i run 'phalcon' on command line, i am getting error

Describe the bug
Fatal error: Uncaught Error: Class 'Phalcon\Version' not found in C:\wamp64\www\phal\vendor\phalcon\devtools\bootstrap\autoload.php:134
Stack trace:
#0 C:\wamp64\www\phal\vendor\phalcon\devtools\phalcon(46): require()
phalcon/phalcon#1 {main}
thrown in C:\wamp64\www\phal\vendor\phalcon\devtools\bootstrap\autoload.php on line 134

@niden
Copy link
Member

niden commented Jul 9, 2021

Moving to devtools

@niden niden transferred this issue from phalcon/phalcon Jul 9, 2021
@Ultimater
Copy link
Member

Devtools relies on the Phalcon\Version class to check Phalcon's version.
This class had some of its methods deprecated and stated it was going to be removed in V5.
But the getVersion() method didn't. Thus the class shouldn't have disappeared in V5.
This would be a bug in cphalcon, not devtools.

@Ultimater
Copy link
Member

cc: @Jeckerson @niden

@Ultimater Ultimater transferred this issue from phalcon/phalcon-devtools Jul 9, 2021
@niden
Copy link
Member

niden commented Jul 9, 2021

The class is under the Support namespace in v5. We just have to change its instantiation and signature (no longer static methods).

@niden
Copy link
Member

niden commented Jul 9, 2021

This needs to go back to devtools. Also, the question will be about versioning i.e. devtools for v5

@Ultimater Ultimater transferred this issue from phalcon/cphalcon Jul 9, 2021
@Ultimater Ultimater self-assigned this Jul 9, 2021
@Ultimater
Copy link
Member

@niden Sorry for the confusion, I thought it was missing functionality being alarmed at seeing the class disappear without first deprecating the class with an alias class. But this would be a major version bump so can't be too picky as breaking changes are expected.

I'll work on implementing this in devtools.

@Ultimater Ultimater modified the milestones: 5.0.x, 4.2.x Jul 9, 2021
Ultimater added a commit to Ultimater/phalcon-devtools that referenced this issue Jul 13, 2021
@Ultimater
Copy link
Member

This has been fixed in 4.2.0

BeMySlaveDarlin pushed a commit to BeMySlaveDarlin/phalcon-devtools that referenced this issue Sep 16, 2021
niden pushed a commit that referenced this issue Sep 18, 2021
* Fix #1479 more verbose pdo driver missing errors

* Fix #1508 devtools version showing phalcon version instead for 4.1.x

* Bump version to 4.1.1

* Fix #1515 Devtools version errors with Phalcon 5

* Adjusting dependencies for PHP 8 support

* #1455 - New code generation

* #1455 - New tests and fix old tests

* #1455 - CHANGELOG

* #1455 - Removed TODOs

* #1455 - Changed static calls

* #1455 - Added escaping namespace placeholder

Co-authored-by: Kevin Yarmak <[email protected]>
Co-authored-by: Aziz Muzafarov <[email protected]>
@MateusJ
Copy link

MateusJ commented Nov 11, 2022

i'm having this same issue.

@analista-marlon
Copy link

It's a simple fix. But since I'm new with phalcon 5, I needed to use AI for some help.
Because of the update, as said above, we need to change two files:

/phalcon-devtools/src/Version.php
"use Phalcon\Version as PhVersion;"
to
"use Phalcon\Support\Version as PhVersion;"

/phalcon-devtools/phalcon
"$vendor = sprintf('Phalcon DevTools (%s)', Version::get());"
to
"
// changed from 'Version::get()' to $version var
$versionInstance = new \Phalcon\Support\Version();
$version = $versionInstance->get();

$vendor = sprintf('Phalcon DevTools (%s)', $version);

"
it must be sufficient to be able to run phalcon command, but be aware, others will come.

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