ellisv / oxid-console

[UNMAINTAINED] OXID Console is php console application for OXID Shop. It provides an API for writing various commands. We have shipped very common for every oxid shop project commands out of the box.
MIT License
23 stars 17 forks source link

Does not work with 6.0 #39

Open alfredbez opened 7 years ago

alfredbez commented 7 years ago

oxid-console does not work with OXID eShop version 6.0 (which is not released atm)

ddpkts commented 7 years ago

I think, or at least I hope @keywan-ghadami-oxid is working on this module to make it work on 6.0

alfredbez commented 7 years ago

I have a working version, PR is coming

keywan-ghadami-oxid commented 7 years ago

If @EllisV has no more time for project, we can maintain it within the community. In that case I suggest to give some volunteers(including me) access to https://github.com/OXIDprojects/oxid-console and maintain a fork. About 6.x support, i am willing to maintain/do that, but i am by my self not yet an early adopter of version 6 so i am looking forward to see the pull request from @alfredbez.

alfredbez commented 7 years ago

Maybe that's a good point to refactor the whole application and build it on the Symfony Console Component, Namespaces and stuff like that (provide a bin/oxid), see also #34

keywan-ghadami-oxid commented 7 years ago

Did you have a look at the 1.3 branch? @EllisV already started with that, but i am not sure about the current status. Btw i would prefer to have the console version independent from the oxid shop, that makes it easier for me to maintain stuff because i could use the same version in all projects.

ellisv commented 7 years ago

@alfredbez Totally agree on refactoring application to use Symfony console component, now especially when oxid has composer support this makes sense more than ever. As keywan already mentioned I've started to work on this on 1.3 branch but it was forgotten for quite some time.

@keywan-ghadami-oxid I am going to resume to work on 1.3 this weekend.

alfredbez commented 7 years ago

I just checked out the 1.3 branch: Awesome! I started yesterday to refactor this using symfony console, because I didn't know that you're actually working on that. If there is anything I can do, just let me know.

alfredbez commented 7 years ago

@EllisV If I don't got it wrong, vendor will be in the same directory as source or htdocs, so this isn't correct anymore, is it? The new directory structure looks like this:

.
|-- source
|   |-- bootstrap.php
|   |-- config.inc.php
|   |-- admin
|   |-- Application
|   |-- Core
|   |-- ...
|   `-- tmp
|-- tests
|   |-- Acceptance
|   |-- css
|   |-- Fixtures
|   |-- Integration
|   `-- Unit
`-- vendor
    |-- behat
    |-- bin
    |-- composer
    |-- ...
    |-- webmozart
    `-- zendframework
ellisv commented 7 years ago

1.3 oxid-console installation will be through composer only, so you can install globally and run oxid console commands in a directory where shop source lies, or in a project itself if it has composer support. And I see you concern, as you'll put oxid-console dependency in composer.json with proposed shop structure what you'll have to do is to be in source directory and go with ../vendor/bin/oxid command which isn't cool ofcourse. What I am thinking to do is maybe to have something like this in composer.json of a project:

{
  "extra": {
    "oxid-web-dir": "source"
  }
}

And take in account that value when bootstrapping shop in oxid console. We could also have some common name checking in there too, so configuration would be optional for most setup, but we need that kind of option if your project structure differ. Do you agree?

alfredbez commented 7 years ago

Global installation is a cool feature. For local installations (per project) I would like to see a similar approach like artisan in the laravel framework, where the console-script is outside of the webroot. We can then also drop the htaccess-stuff. What do you think?

ellisv commented 7 years ago

In order to have oxid console executable in oxid project directory itself (non vendor directory) we would have to make people to put it there manually (as we do it now). Going with vendor/bin/oxid cache:clear is not that big of a deal comparing that we will have a benefit of controlling the contents of every single file that we ship. Even something like bin/oxid cache:clear is possible if you have project composer bin-dir option set to bin.

keywan-ghadami-oxid commented 6 years ago

Hi there is a oxid 6 compatible port available https://github.com/OXIDprojects/oxid-console that can be installed with composer and after some time it becomes natural to work like this: vendor/bin/oxid cache:clear