Welcome Guest, Not a member yet? Register   Sign In
Documentation: Creating Composer Packages
#1

We will add the new documentation about Creating Composer Packages.
https://codeigniter4.github.io/CodeIgnit...kages.html

If you have any suggestion or question, feedback is welcome.
Reply
#2

In my opinion, this is the most useless thing that could be invented.
I mean that such a manual has a place in an article on some resource and without reference to CI coding standards.

In such a "guide" I would be primarily interested in the type of license. What are and which is better to choose.
Reply
#3

Thanks for guide

Learning CI4 from my works, from errors and how to fix bugs in the community

Love CI & Thanks CI Teams

Reply
#4

@iRedds Is there any good article for beginners to create Composer packages?

My intent is to explain things for CI4:
https://codeigniter4.github.io/CodeIgnit...nfig-files
Because I did not know that well.

Also, I want to let people to know that you should use your package vendor name as your vendor namespace.
Some developers mistakenly believe that they are free to name vendor namespaces independently of the package name.
Reply
#5

(This post was last modified: 07-31-2023, 10:58 PM by kenjis.)

(07-31-2023, 03:29 AM)iRedds Wrote: In such a "guide" I would be primarily interested in the type of license. What are and which is better to choose.

Use MIT, if you don't have a strong opinion.
Because it is most commonly used in the PHP world, and no conflicts with other Open Source Licenses.

For example, if you want to prohibit a large company such as Google from modifying and using your packages, you should choose the GNU AGPLv3.

See https://choosealicense.com/
Reply
#6

(This post was last modified: 07-31-2023, 10:29 PM by luckmoshy.)

@iRedds I argue that your opinion is really biased I personally take this as very interesting since it helps newbies in CI sometimes to learn how they can integrate their third-party modules or packages with the composer in CI because the main intent is to give Ideas or teach CI users how they can appropriately deal with Composer in Ci with their third party composer packages and this can also do a lot includes Lincences so this is very interesting really and so on as you asked before
Codeigniter First, Codeigniter Then You!!
yekrinaDigitals

Reply
#7

I also think that this is a good idea, I have seen that alot of the users are just using the folder Modules insteand
of their own Namespace name like InsiteFX/Modules.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#8

I believe this is a great idea, as it will serve as a guide to developers wanting to create custom packages.

For example, WordPress has a developer handbook for custom plugins and themes, which guide developers on how to create custom plugins and themes. Though it is totally not compulsory to follow the coding standards and folder structure, it is necessary if a developer wants to submit their plugin/theme to the WordPress directory, and for better collaboration from other WordPress developers.

I suggest that a link to the choosing a license should be added to the page too, to help developers choose their preferred license.
Reply
#9

(07-31-2023, 05:12 PM)kenjis Wrote: @iRedds Is there any good article for beginners to create Composer packages?
Google?

(07-31-2023, 05:12 PM)kenjis Wrote: My intent is to explain things for CI4:
https://codeigniter4.github.io/CodeIgnit...nfig-files
Because I did not know that well.

Did you know that if you register a module in composer.json in the autoload section, the short config name won't work?
Since only modules registered in the Autoload config and installed via `composer require` are allowed.

(07-31-2023, 05:12 PM)kenjis Wrote: Also, I want to let people to know that you should use your package vendor name as your vendor namespace.
Some developers mistakenly believe that they are free to name vendor namespaces independently of the package name.

I can't find any information that says the namespace should be the name of the vendor.

What do you say about it?

vendor name | namespace
fakerphp | Faker
mikey179 | org\bovigo\vfs
myclabs | DeepCopy
nikic | PhpParser

And these are just the packages used in codeigniter4/appstarter.

The most important. codeigniter4 | CodeIgniter
Reply
#10

(08-01-2023, 12:23 AM)iRedds Wrote: I can't find any information that says the namespace should be the name of the vendor.

What do you say about it?

vendor name | namespace
fakerphp      | Faker
mikey179    | org\bovigo\vfs
myclabs        | DeepCopy
nikic            | PhpParser

Misuses.
If we can freely use vendor namespaces, how do we avoid name collision?
How do we know the vendor namespace that is not used?

"codeigniter4 | CodeIgniter" is not the problem, because the organization has the vendor name "codeigniter".
https://packagist.org/packages/codeigniter/
Reply




Theme © iAndrew 2016 - Forum software by © MyBB