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

yii2-codecetion and codeception.phar #1913

Closed
dizews opened this issue Jan 11, 2014 · 28 comments
Closed

yii2-codecetion and codeception.phar #1913

dizews opened this issue Jan 11, 2014 · 28 comments
Assignees
Milestone

Comments

@dizews
Copy link
Contributor

dizews commented Jan 11, 2014

I am using codeception like a phar archive but yii2-codeception include codeception like dependency.
How can I disable downloading codeception by composer?

@Ragazzo
Copy link
Contributor

Ragazzo commented Jan 11, 2014

you can install project with the same command, but with flag --no-dev, it will skip all require-dev dependencies for the project so you will need to install yii2-gii,yii2-debug manually by command php composer.phar require --dev "yii2-gii *" "yii2-debug *".

@dizews
Copy link
Contributor Author

dizews commented Jan 11, 2014

yii2-codecetion has

"require": {
                "yiisoft/yii2": "*",
                "codeception/codeception": "*",
                "codeception/specify": "*"
        },

@Ragazzo
Copy link
Contributor

Ragazzo commented Jan 11, 2014

right, i guess we can move codeception/codeception to the require-dev section. specify can be as-is because of it does not depends on main codeception repo. Could you make PR?

dizews added a commit to dizews/yii2 that referenced this issue Jan 11, 2014
move codeception into require-dev section yiisoft#1913
@cebe
Copy link
Member

cebe commented Jan 11, 2014

@Ragazzo why does it depend on specify?

@ghost ghost assigned cebe Jan 11, 2014
@Ragazzo
Copy link
Contributor

Ragazzo commented Jan 11, 2014

$this->specify https://github.com/yiisoft/yii2/blob/master/apps/basic/tests/unit/models/ContactFormTest.php#L41
Very useful, was discussed and merged long time ago, i guess the time when dragons existed :D

@cebe cebe closed this as completed in a2be28d Jan 11, 2014
@qiangxue
Copy link
Member

Shouldn't specify be moved to the app's composer.json too?

@cebe
Copy link
Member

cebe commented Jan 11, 2014

yeah, the extension does not depend on it as far as I see. thats why I asked... have no knowledge in codeception so I can't tell for sure.

@cebe cebe reopened this Jan 11, 2014
@Ragazzo
Copy link
Contributor

Ragazzo commented Jan 12, 2014

right, so with this changes i think issue could be closed. @dizews confirm that dependencies works ok for you?

@dizews
Copy link
Contributor Author

dizews commented Jan 12, 2014

thank you, dependency in yii work fine.

I have a problem with codeception.phar but it isn't a problem yii.

@Ragazzo
Copy link
Contributor

Ragazzo commented Jan 12, 2014

what kind of problem?

@cebe cebe closed this as completed in 51cb921 Jan 12, 2014
@dizews
Copy link
Contributor Author

dizews commented Jan 12, 2014

@Ragazzo, codecept.phar archive was built with composer which didn't support psr4

@Ragazzo
Copy link
Contributor

Ragazzo commented Jan 12, 2014

@dizews ah, got it. if problem still exists you can contact to @DavertMik for this problem.

@schmunk42
Copy link
Contributor

@Ragazzo @cebe Why does yii2-codeception not directly require codeception/codeception and specify?

@samdark
Copy link
Member

samdark commented Feb 18, 2014

Because codeception can be installed globally.

@Ragazzo
Copy link
Contributor

Ragazzo commented Feb 18, 2014

yes, and because it can take some time to download it, since codeception goes the approach of middleware and using a lot of deps.

@schmunk42
Copy link
Contributor

What's about compatibility? I had some problems in earlier versions, when upgrading.
Do I have to install a matching version globally?

Downloading should be not a big deal btw. when using install a .lock-file and --prefer-dist.

@Ragazzo
Copy link
Contributor

Ragazzo commented Feb 18, 2014

current stable is 1.8, afaik its fine enough, some problems unfortunately can be because codeception use other things like sf-components, guzzle, etc; and bugs in them sometimes are hardly to explore.

@schmunk42
Copy link
Contributor

it's a little bit OT maybe...

I am playing around with yii2 and codeception ... but I got this error:

$ vendor/bin/codecept build
PHP Fatal error:  Class 'Codeception\Actor' not found in /phundament/app-vagrant-v4/tests/unit/CodeGuy.php on line 23

In which package and version should that class be found?

Am 18.02.2014 um 14:47 schrieb Mark [email protected]:

yes, and because it can take some time to download it, since codeception goes the approach of middleware and using a lot of deps.


Reply to this email directly or view it on GitHub.

#Contact
[email protected]
skype:https://schmunk23
https://usrbin.de

#Social
https://www.facebook.com/schmunk42
https://twitter.com/schmunk42
https://www.xing.com/profile/Tobias_Munk
https://www.linkedin.com/pub/tobias-munk/20/a67/380

#OpenSource
https://phundament.com/
https://lithron.de/
https://github.com/schmunk42

@Ragazzo
Copy link
Contributor

Ragazzo commented Feb 18, 2014

Class 'Codeception\Actor'

it looks like you are using codeception 2.0, because Actor was introduced there. we switched to 1.8@dev because it is current stable.

@schmunk42
Copy link
Contributor

Hmmm, looks like I updated to that version while testing.
How to fix this. I'll switch to 1.8-dev ... do I have to delete some files (Guys) also and the build or bootstrap?

@Ragazzo
Copy link
Contributor

Ragazzo commented Feb 18, 2014

build is better i think.

@schmunk42
Copy link
Contributor

Thx. I was able start the tests again, but I had to remove my Web-, Code- and TestGuy before and then build.

Just because I think this is also related to #2465 ... I wasn't able to re-build with a 1.8er version, because I accidentally built with 2.0 - and PHP complained with the above error.

@samdark @Ragazzo:
In conclusion: The committed "guys" depend on your codeception installation - I think this can get quite confusing. But these are just my 2 cents.

Or ... What's about a --force option for build?

@Ragazzo
Copy link
Contributor

Ragazzo commented Feb 18, 2014

we dont have guys in our tests, there is a note that user should first run build.

@schmunk42
Copy link
Contributor

But then shouldn't they be added to .gitignore, something like /tests/*/*Guy.php?

@Ragazzo
Copy link
Contributor

Ragazzo commented Feb 18, 2014

why we should add them if they are not exists in boilerplate? or you mean when user created project and commiting it in his own repo? maybe.

@schmunk42
Copy link
Contributor

It's up to you, at least I understand now, how it works 😄

@Ragazzo
Copy link
Contributor

Ragazzo commented Feb 18, 2014

well, it is not only me, since i want developers to use tests)) anyway if you feel that this is need to be done, open PR ;)

@schmunk42
Copy link
Contributor

It depends ... if you're going to recommend the global installation, I'd add those to .gitignore, if you recommend using the files from vendor/bin/ also with a sane constraint for codeception, you should commit the "guys" into your repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants