Git Product home page Git Product logo

Comments (15)

iMattPro avatar iMattPro commented on June 14, 2024

All 3.1 support really means in this extension at this point, is that the User object will still handle the language methods, and a few other minor things for 3.1 backwards compaibility.

I don't want to shut people out of the option of generating 3.1 BC compatible skeletons. The CDB would not deny an extension for still working in both 3.1 and 3.2 (i.e.: using the User object), nor would it deny an extension whose minimum phpBB requirement is 3.1.0 (as defined in their composer.json).

Basically, if an author wants their extension minimum phpBB version supported to be 3.1.0, then this extension should generate an appropriate skeleton for that. It would still also be a 3.2 extension (just also happens to work still in 3.1, kind of like most of the extensions currently active in CDB, and also the CDB itself)

IMHO, until phpBB stops providing 3.1 as a download (it still does) and the deprecated User language methods actually do get removed (they haven't yet) should we begin to consider removing the option in here for generating extensions that are 3.1 backwards compatible.

from phpbb-ext-skeleton.

iMattPro avatar iMattPro commented on June 14, 2024

Can you expand on your first point? I'm not seeing that.
Nothing selected:
screen shot 2019-01-16 at 10 48 15 pm

Only MCP selected:
screen shot 2019-01-16 at 10 48 29 pm

from phpbb-ext-skeleton.

iMattPro avatar iMattPro commented on June 14, 2024

As to the 2nd point, it's intended to use the packge name in keys and not display name.

We want keys like: WACKY_WAVING_KEY
We don't want keys like: WACKY_WAVY_INFLATABLE_FLAILING_ARM_TUBE_MAN!!!_KEY

The extension package name will be short and free from special characters and is the best choice, as opposed to the more verbose and unrestricted display names. 😉

from phpbb-ext-skeleton.

DavidIQ avatar DavidIQ commented on June 14, 2024

For the first point I had selected ACP but ended up with all CPs. I'll have to go back and try generating again as there must be some other options I selected to cause that.

For the second point note how I said the value (right side) and not the key (left side). What is generated looks something like this:

'MYEXTENSION_MAIN' => 'myextension Main'

from phpbb-ext-skeleton.

iMattPro avatar iMattPro commented on June 14, 2024

Oh. Well even so those ACP Lang values are intentionally like that. The description name is still not as appropriate as the extension name for things like a Module name in our generic skeleton. Users will should be changing them to suit their needs as with a lot of what gets generated

from phpbb-ext-skeleton.

DavidIQ avatar DavidIQ commented on June 14, 2024

How is this (package name):

'MYEXTENSION_MAIN' => 'myextension Main'

more appropriate than this (display name):

'MYEXTENSION_MAIN' => 'My Extension Main'

from phpbb-ext-skeleton.

DavidIQ avatar DavidIQ commented on June 14, 2024

I've updated the first message with the actual details of the CP issue. Totally missed that it's the migration files that are being generated.

from phpbb-ext-skeleton.

iMattPro avatar iMattPro commented on June 14, 2024

Again, the values do not truly matter since users should be changing things to what they really need.

The naming comes from what the Skeleton was in its previous version. Anywhere Acme was used we went with VENDOR, anywhere DEMO was used, we went with PACKAGE and anywhere Acme Demo was used, we went with DESCRIPTION NAME.
0cb2b29#diff-acc00e952521ae31ec72a7c5a151e00fL23

from phpbb-ext-skeleton.

iMattPro avatar iMattPro commented on June 14, 2024

Currently when you choose migrations, all migration files are generated. There may be no need for the migration check box since every migration file can also be generated by choosing another object, like ACP, MCP or UCP, however the idea was if you want sample migrations check this box and you'll get a bunch of examples.

from phpbb-ext-skeleton.

iMattPro avatar iMattPro commented on June 14, 2024

Maybe we could add a generic and useless migration file specifically for that checkbox. And let all the other migration files just come from their respective CP module checkboxes. One that does some basic stuff like add a config, config_text, etc.

from phpbb-ext-skeleton.

3D-I avatar 3D-I commented on June 14, 2024

I actually complained about this years ago, #39 . I agree with the all the points made by David.

from phpbb-ext-skeleton.

DavidIQ avatar DavidIQ commented on June 14, 2024

Again, the values do not truly matter since users should be changing things to what they really need.

The naming comes from what the Skeleton was in its previous version. Anywhere Acme was used we went with VENDOR, anywhere DEMO was used, we went with PACKAGE and anywhere Acme Demo was used, we went with DESCRIPTION NAME.
0cb2b29#diff-acc00e952521ae31ec72a7c5a151e00fL23

This doesn't make a whole lot of sense. You're wanting to force the user to always replace one thing with another that they've already entered? Why? Just because you want them to consciously do that? Every time I generate an extension with an ACP module I'm having to go into the language file and replace the log key's value, the title's value, and the settings' value to exactly what I entered for the title. Same for some of the other generated language files. I can't imagine that I'm in the minority in having to do this pointless exercise for every generated extension.

Maybe we could add a generic and useless migration file specifically for that checkbox. And let all the other migration files just come from their respective CP module checkboxes. One that does some basic stuff like add a config, config_text, etc.

We already have a useless migration example with the user_schema one. The CP ones are more like a necessity when those modules are selected. At this point this extension should not be considered a learning tool and more in line with what the README states:

phpBB's Skeleton Extension is a tool for extension authors to help speed up and simplify the task of starting a new extension project. It generates sample starter files and directories in a skeleton package that you can use to begin building your extension.

While it is true that the user could just delete the files, as stated in @3D-I's issue, the whole point of this issue is to improve usability.

from phpbb-ext-skeleton.

iMattPro avatar iMattPro commented on June 14, 2024

This doesn't make a whole lot of sense. You're wanting to force the user to always replace one thing with another that they've already entered? Why? Just because you want them to consciously do that? Every time I generate an extension with an ACP module I'm having to go into the language file and replace the log key's value, the title's value, and the settings' value to exactly what I entered for the title. Same for some of the other generated language files. I can't imagine that I'm in the minority in having to do this pointless exercise for every generated extension.

Well of course that's what we want! How can we assume what the user is actually trying to do???? The whole point is this is a boiler plate with very minimal functional code for example/informational purposes. Things like lang keys and values are named generically, because they need to be named something, and the user can see how they are being used. This extension is not and has never been designed to build your extensions for you...just to get you a batch of generic files to get off and running writing your own code.

Originally, until this update, what it output was NickV's Acme Demo extension (which meant searching for acme and demo throughout all the files to change to your own naming). In this update we simply wanted to remove all the Acme and Demo references with the user's own vendor and package name since, in some case, but not all, those names will fall into place and not need changing (such as in namespaces, for example). But of course a user will need to -- I don't know -- build their own extension 😉 and that means removing the sample code they don't need and modifying the remaining code that works for them to their own needs.

from phpbb-ext-skeleton.

DavidIQ avatar DavidIQ commented on June 14, 2024

That's fine and dandy, except you also replaced all instances of Acme, which is what is displayed on the interface, with whateverextension which was never displayed. You can argue all you want about it, but that was done wrong and now needs fixing.

from phpbb-ext-skeleton.

iMattPro avatar iMattPro commented on June 14, 2024

Also, as you pointed out:

It generates sample starter files

The keyword there being "sample" 😄

I don't know what you mean by Acme which is displayed on the interface...or what was actually done wrong?

from phpbb-ext-skeleton.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.