Comments (15)
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.
Can you expand on your first point? I'm not seeing that.
Nothing selected:
from phpbb-ext-skeleton.
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.
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.
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.
How is this (package name):
'MYEXTENSION_MAIN' => 'myextension Main'
more appropriate than this (display name):
'MYEXTENSION_MAIN' => 'My Extension Main'
from phpbb-ext-skeleton.
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.
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.
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.
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.
I actually complained about this years ago, #39 . I agree with the all the points made by David.
from phpbb-ext-skeleton.
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.
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.
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.
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)
- Cannot enable on phpbb 3.2.7
- Include vendor & extname when rendering page
- Symfony error HOT 1
- PHP version invalid while creating a package HOT 1
- extension:create cli does not register, nor does the created console skeleton sample command HOT 34
- Extension Skeleton 1.0.0-alpha1 HOT 7
- Convert "tpl" files to twig
- Not required Migration files created. HOT 4
- But the link remains always visible, also to guests HOT 1
- Add core.viewonline_overwrite_location listener HOT 1
- ext.php generation is incorrect for notifications
- Author's name is not rendered in UTF-8
- unable to delete store/ext-tmp/extname HOT 2
- lang variable for notifications created in info_ucp_.. not needed. HOT 1
- wrong table name in services.yml and parameters.yml HOT 2
- language file not created just for the listener - hard-coded language var in listener.php HOT 2
- Bug with 3.1.12 --> "finder" HOT 1
- Controllers HOT 1
- Enhance install_user_schema migration file template HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phpbb-ext-skeleton.