Sourcehunt September - Hacktoberfest Edition
Participate in DigitalOcean’s Hacktoberfest to contribute to open source projects!
Activity Highlights:
- DigitalOcean's Hacktoberfest is enabled, encouraging everyone to contribute code to various open source projects. Complete 4 pull requests to get a T-shirt in recognition of your contribution to the open source community.
- Recommended projects include: simplifying the Kodus/mail package for UTF-8 mailing; object-oriented array operation interface voku/Arrayy; and Atom plug-in php-integrator/atom-base for assisting static code checks.
- Other projects worth participating in include: currency exchange framework florianv/exchanger; national information retrieval package rinvex/country; and cache hit rate analysis tool Corollalium/PSR6-ProfileCachePool.
The annual DigitalOcean Hacktoberfest is here again!
This is a one-month open source event that encourages everyone to contribute code to various open source projects (not their own projects). Submit 4 pull requests (even document corrections count!) to get a T-shirt at the end of the month, symbolizing your contribution to the open source community.
Of course, open source is much more than a month, but it's a very good start for those who don't usually spend time contributing to other developer projects.
If you want to participate, you might as well select some from the list of projects we have compiled this month. If you are not interested in these projects, you can visit Sourcehunt's PHP tag to see if you can find more interesting projects.
Let's get started!
kodus/mail [3 ★]
Kodus was submitted to Sourcehunt after we published our article "Using PHP and Swiftmailer for Recruiting Spam".
Kodus/mail is a brand new alpha-level package designed to make UTF-8 mailing easier while skipping all the old-style burdens (old-style autoloading, naming conventions, etc.) that come with Swiftmailer. As the author says, the goal is to “use modern PHP and limit the scope of functionality for simplicity”.
This is a great opportunity for you to join a very promising project!
voku/Arrayy [20 ★]
Arrayy is a powerful and versatile object-oriented array operation interface. README is introduced as follows:
Arrayy::create(['Array', 'Array'])->unique()->append('y')->implode() // Arrayy
This is just one of the nearly infinite possible chains of operations provided by Arrayy. Other usages include:
createFromString(string $str) : Arrayy
(Immutable) Create a new Arrayy object through a string.
Arrayy::create(['Array', 'Array'])->unique()->append('y')->implode() // Arrayy
append(mixed $value) : Arrayy
(Variable) Append value to the current array. Alias: "Arrayy->add()"
$arrayy = A::createFromString(' foo, bar '); // Arrayy['foo', 'bar']
containsCaseInsensitive(string $value) : boolean
Checks whether the (case-insensitive) string is in the current array.
a(['fòô' => 'bàř'])->append('foo'); // Arrayy['fòô' => 'bàř', 0 => 'foo']
each(Closure $closure) : Arrayy
(Immutable) Iterates over the current array and modify the value of the array.
a(['E', 'é'])->containsCaseInsensitive('É'); // true
find(Closure $closure) : mixed
Find the first item in the array to pass the truth test, otherwise return false.
$result = A::create(); $closure = function ($value) { return ':' . $value . ':'; }; a(['foo', 'bar' => 'bis'])->each($closure); // Arrayy[':foo:', 'bar' => ':bis:']
randomWeighted(array $array, int|null $take) : Arrayy
(Immutable) Get random values from an array and be able to skew the result.
$search = 'foo'; $closure = function ($value, $key) use ($search) { return $value === $search; }; a(['foo', 'bar', 'lall'])->find($closure); // 'foo'
searchValue(mixed $index) : Arrayy
(Immutable) Search the value of the current array via $index.
a([0 => 3, 1 => 4])->randomWeighted([1 => 4]); // 例如:Arrayy[4](有 66% 的概率返回 4)
toJson() : string
Converts the current array to JSON.
a(['fòô' => 'bàř'])->searchValue('fòô'); // Arrayy[0 => 'bàř']
… There are more features. The project has been around for a while, but despite being well tested and well documented, it has not been widely adopted yet, so let's hope Sourcehunt can help!
voku/portable-utf8 [76 ★]
The same as the Arrayy package above is written by the same person, portable-utf8 is a UTF-8 implementation in PHP without any extension prerequisites. In other words, UTF-8 will be enabled on your server regardless of whether your server has an extension that supports UTF-8 or not. If the extension is missing, Symfony's polyfills will be used.
I will let the "Cause" section tell you why this package exists:
It is important to note that if you already use some UTF-8 specific features in your application, transitioning to this package is not an easy task, as it is not a direct replacement. Due to the nature of the package, it is also worth remembering that it will become a hard dependency. Still, it seems worth it considering the benefits.PHP 5 and earlier does not have native Unicode support. To bridge this gap, there are some extensions, such as "mbstring", "iconv" and "intl".
The problem with "mbstring" and other extensions is that in most cases you cannot ensure that there are specific extensions on the server. If you rely on one of these, your application will no longer be portable. This problem becomes even more serious for open source applications that must run on different servers with different configurations.
The package has no unsolved issues or pull requests, and no TODO is defined, but its test coverage and Scrutinizer score can be improved, so if you want to contribute by optimizing test levels and perceived code quality, it's yours now Chance.
php-integrator/atom-base [168 ★]
PHP-integrator is an Atom package that facilitates static code checking—that is, it adds many useful code completion and code prompting features in PhpStorm to Atom.
It currently relies on Atom because it is an Atom package, but its PHP code can be easily extracted and applied to another editor with hooks that make integration possible. Another idea – why not make it work with Docker out of the box to help people avoid having to install PHP on their host operating system? Join!
florianv/exchanger [7 ★]
This package is a "currency exchange framework", which means it is used to develop currency exchange package. Think of it as a standard that can help you develop your own interchangeable currency exchange package.
An interesting implementation of this "framework" is the popular Swap package of the same author.
While both packages are quite mature, Exchanger can do better.
By the way, if you are interested in writing an article about Exchanger and demonstrating the functionality of the framework, please contact us – we are looking for it!
rinvex/country [383 ★]
As the description says:
Rinvex Country is a simple and lightweight package for flexible search of country details. It provides a large amount of data, including names, populations, capitals, ISO codes, dial codes, geographic data, currencies, logos, emojis, and other attributes in 250 countries around the world, at your fingertips.
Example:
Arrayy::create(['Array', 'Array'])->unique()->append('y')->implode() // Arrayy
As someone currently building two separate geo-aware applications, I absolutely appreciate this package – it makes things much easier when it comes to handling common country information.
The library already has pretty decent adoption rates due to its versatile documentation and excellent code quality scores, but still has more users and contributors available. Can you help? You can solve some problems now!
ScriptFUSION/Mapper [7 ★]
Honestly, I don't know what this is, nor what I'd do with it, but Ocramius praised it, so I put it on the list.
If you feel you can explain what this is to a complete beginner, please contact us and we will pay you to write this article.
lufficc/laravel-blog [164 ★]
A Laravel 5.3 blog system! From the feedback, it's pretty good, but certainly requires more features. Why not join and help?
If you did, please let us know-we are more than happy to conduct a thorough analysis!
Corollalium/PSR6-ProfileCachePool/ [9 ★]
Do you use PSR-6 cache? If so, you might be interested in this analyzer, which monitors the number of hits and misses implemented by the cache. It doesn't work unless you notice some differences and want to debug, but if you need it, it's here!
Why not contribute to the package by adding more report formats (animated charts?) or other statistics to track?
This is what September is about – as always, please send us your link using the #sourcehunt tag! Now, let's start Hacktoberfest! Let us know what you did and wish you a happy coding!
The above is the detailed content of Sourcehunt September - Hacktoberfest Edition. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics





Alipay PHP...

JWT is an open standard based on JSON, used to securely transmit information between parties, mainly for identity authentication and information exchange. 1. JWT consists of three parts: Header, Payload and Signature. 2. The working principle of JWT includes three steps: generating JWT, verifying JWT and parsing Payload. 3. When using JWT for authentication in PHP, JWT can be generated and verified, and user role and permission information can be included in advanced usage. 4. Common errors include signature verification failure, token expiration, and payload oversized. Debugging skills include using debugging tools and logging. 5. Performance optimization and best practices include using appropriate signature algorithms, setting validity periods reasonably,

Session hijacking can be achieved through the following steps: 1. Obtain the session ID, 2. Use the session ID, 3. Keep the session active. The methods to prevent session hijacking in PHP include: 1. Use the session_regenerate_id() function to regenerate the session ID, 2. Store session data through the database, 3. Ensure that all session data is transmitted through HTTPS.

The application of SOLID principle in PHP development includes: 1. Single responsibility principle (SRP): Each class is responsible for only one function. 2. Open and close principle (OCP): Changes are achieved through extension rather than modification. 3. Lisch's Substitution Principle (LSP): Subclasses can replace base classes without affecting program accuracy. 4. Interface isolation principle (ISP): Use fine-grained interfaces to avoid dependencies and unused methods. 5. Dependency inversion principle (DIP): High and low-level modules rely on abstraction and are implemented through dependency injection.

How to debug CLI mode in PHPStorm? When developing with PHPStorm, sometimes we need to debug PHP in command line interface (CLI) mode...

How to automatically set the permissions of unixsocket after the system restarts. Every time the system restarts, we need to execute the following command to modify the permissions of unixsocket: sudo...

Static binding (static::) implements late static binding (LSB) in PHP, allowing calling classes to be referenced in static contexts rather than defining classes. 1) The parsing process is performed at runtime, 2) Look up the call class in the inheritance relationship, 3) It may bring performance overhead.

Sending JSON data using PHP's cURL library In PHP development, it is often necessary to interact with external APIs. One of the common ways is to use cURL library to send POST�...
