Participate in DigitalOcean’s Hacktoberfest to contribute to open source projects!
Activity Highlights:
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!