Sourcehunt September-Hacktoberfest版

It’s that time of year again – DigitalOcean’s Hacktoberfest is starting!

又是一年中的那个时候– DigitalOcean的Hacktoberfest开始了

It’s a month-long open source effort when people are encouraged to contribute to various open source projects (not their own!). Anyone who opens 4 pull requests (even documentation fixes count!) gets a T-shirt at the end of the month, symbolizing their engagement in the open source community.

鼓励人们为各种开源项目(而不是他们自己的项目)做出贡献,这是一个月的开源工作。 打开4个请求请求的任何人(甚至包括文档修复!)都将在本月底获得一件T恤,这表明他们参与了开源社区。

Of course, open source is much more than just a single month, but for people who don’t generally take the time to contribute to other developers’ projects, it’s more than a good start.

当然,开源不仅仅是一个月,但对于那些通常不花时间为其他开发人员的项目做贡献的人来说,这不仅仅是一个好的开始。

If you’d like to participate, why not pick some of the projects from the list we’ve compiled this month? And if these don’t tickle your fancy, why not visit the sourcehunt PHP tag and see if you can find something more interesting?

如果您想参加,为什么不从我们本月编制的清单中选择一些项目呢? 如果这些都不会让您感到不满意 ,为什么不访问sourcehunt PHP标记 ,看看是否可以找到更有趣的东西?

Let’s dive in!

让我们潜入吧!

Sourcehunt logo


kodus /邮件 [3★] (kodus/mail [3 ★])

Just as we published our Fighting Recruiter Spam with PHP post, using Swiftmailer to send replies, Kodus got submitted to Sourcehunt.

就像我们用Swiftmailer 发布带有PHP的Fighting Recruiter Spam帖子一样 ,使用Swiftmailer发送答复时,Kodus也已提交给Sourcehunt。

Kodus/mail is a brand new alpha-level package designed to make sending UTF-8 email even simpler, while at the same time skipping all the legacy baggage Swiftmailer drags along with it (old school autoloading, naming conventions, etc.). As the author says, the aim is to “start over with modern PHP and a limited scope in terms of features, for the sake of simplicity.”

Kodus / mail是一个全新的Alpha级别软件包,旨在使发送UTF-8电子邮件变得更加简单,同时跳过了Swiftmailer拖曳的所有遗留行李(旧式自动加载,命名约定等)。 正如作者所说,其目的是“为了简单起见,以现代PHP重新开始,并在功能方面限制了范围”。

Here’s your chance to get in on the ground floor of a very promising project!

这是您进入一个非常有前途的项目的底层的机会!



voku / Arrayy [20★] (voku/Arrayy [20 ★])

Arrayy is a very powerful and versatile object oriented interface for array manipulation. As the README intro says:

Arrayy是一个非常强大且用途广泛的面向对象的界面,用于进行数组操作。 如README简介所述:

Arrayy::create(['Array', 'Array'])->unique()->append('y')->implode() // Arrayy

This is just one of the near infinite number of possible chains of operations that Arrayy provides. Other usages include things like:

这只是Arrayy提供的几乎无限数量的可能操作链之一。 其他用法包括:

createFromString(string $ str):数组(不可变) (createFromString(string $str) : Arrayy (Immutable))

Create an new Arrayy object via string.

通过字符串创建一个新的Arrayy对象。

$arrayy = A::createFromString(' foo, bar '); // Arrayy['foo', 'bar']
append(mixed $ value):数组(可变) (append(mixed $value) : Arrayy (Mutable))

Append a value to the current array.

将值附加到当前数组。

alias: “Arrayy->add()”

别名:“ Arrayy-> add()”

a(['fòô' => 'bàř'])->append('foo'); // Arrayy['fòô' => 'bàř', 0 => 'foo']
containsCaseInsensitive(string $ value):布尔值 (containsCaseInsensitive(string $value) : boolean)

Check if an (case-insensitive) string is in the current array.

检查当前数组中是否包含(不区分大小写)字符串。

a(['E', 'é'])->containsCaseInsensitive('É'); // true
each(Closure $ closure):数组(不可变) (each(Closure $closure) : Arrayy (Immutable))

Iterate over the current array and modify the array’s value.

遍历当前数组并修改数组的值。

$result = A::create();
$closure = function ($value) {
  return ':' . $value . ':';
};
a(['foo', 'bar' => 'bis'])->each($closure); // Arrayy[':foo:', 'bar' => ':bis:']
find(closure $ closure):混合的 (find(Closure $closure) : mixed)

Find the first item in an array that passes the truth test, otherwise return false.

在通过真相测试的数组中找到第一项,否则返回false。

$search = 'foo';
$closure = function ($value, $key) use ($search) {
  return $value === $search;
};
a(['foo', 'bar', 'lall'])->find($closure); // 'foo'
randomWeighted(array $ array,int | null $ take):数组(不可变) (randomWeighted(array $array, int|null $take) : Arrayy (Immutable))

Get a random value from an array, with the ability to skew the results.

从数组中获取随机值,并具有使结果倾斜的能力。

a([0 => 3, 1 => 4])->randomWeighted([1 => 4]); // e.g.: Arrayy[4] (has a 66% chance of returning 4)
searchValue(mixed $ index):数组(不可变) (searchValue(mixed $index) : Arrayy (Immutable))

Search for the value of the current array via $index.

通过$ index搜索当前数组的值。

a(['fòô' => 'bàř'])->searchValue('fòô'); // Arrayy[0 => 'bàř']
toJson():字符串 (toJson() : string)

Convert the current array to JSON.

将当前数组转换为JSON。

a(['bar', array('foo')])->toJson(); // '["bar",{"1":"foo"}]'

… and much, much more. The project has been out for a while, but has yet to achieve widespread adoption despite being fully tested and well documented, so let’s hope Sourcehunt helps!

……还有更多。 该项目已经进行了一段时间,但是尽管经过了充分的测试和充分的文档记录,但尚未获得广泛采用,因此,希望Sourcehunt能够为您提供帮助!



voku / portable-utf8 [76★] (voku/portable-utf8 [76 ★])

Made by the same person who made the above Arrayy package, portable-utf8 is an implementation of UTF-8 in PHP without any extension prerequisites. In other words, whether or not your server has the UTF-8-friendly extensions installed, UTF-8 will be enabled on your server. If the extensions are missing, polyfills from Symfony will be used.

Portable-utf8由制作上述Arrayy软件包的同一人制作,是PHP中UTF-8的实现,没有任何扩展先决条件。 换句话说,无论您的服务器是否安装了UTF-8友好扩展名,都将在服务器上启用UTF-8。 如果缺少扩展名,将使用Symfony的polyfills。

I’ll let the “why” section tell you why this exists:

我将在“为什么”部分中告诉您原因:

PHP 5 and earlier versions have no native Unicode support. To bridge the gap, there exist several extensions like “mbstring”, “iconv” and “intl”.

PHP 5和更早版本不支持本机Unicode。 为了弥合差距,存在一些扩展名,例如“ mbstring”,“ iconv”和“ intl”。

The problem with “mbstring” and others is that most of the time you cannot ensure presence of a specific one on a server. If you rely on one of these, your application is no more portable. This problem gets even severe for open source applications that have to run on different servers with different configurations.

“ mbstring”和其他字符串的问题是,在大多数情况下,您无法确保服务器上存在特定的字符串。 如果您依赖其中之一,则您的应用程序将不再具有可移植性。 对于必须在具有不同配置的不同服务器上运行的开源应用程序,此问题甚至更加严重。

It’s important to note that if you’re already using some UTF-8-specific functionality in your app, transitioning to this package is less than straightforward since it’s not a drop-in replacement. Due to the package’s nature, it’s also worth keeping in mind that it’ll become a hard dependency. Still, considering the gains, it seems worth it.

需要注意的重要一点是,如果您已经在应用程序中使用了某些特定于UTF-8的功能,则过渡到此程序包的过程并不那么简单,因为它不是直接替代。 由于程序包的性质,还应牢记它将成为硬依赖性。 不过,考虑到收益,这似乎是值得的。

The package has no open issues or pull requests, and no TODOs defined, but its test coverage and Scrutinizer score could use some work, so if you’re looking to contribute by optimizing test levels and perceived code quality, now’s your chance.

该软件包没有公开的问题或拉取请求,也没有定义TODO,但是它的测试覆盖率和Scrutinizer评分可能需要做一些工作,因此,如果您希望通过优化测试级别和感知的代码质量做出贡献,那么现在就是您的机会。



php-integrator / atom-base [168★] (php-integrator/atom-base [168 ★])

PHP-integrator is an Atom package which helps with code linting – i.e. adds many of the useful code completion and code hinting features from PhpStorm to Atom.

PHP-integrator是一个Atom软件包,可帮助进行代码插入-即从PhpStorm到Atom添加许多有用的代码完成和代码提示功能。

It’s currently dependent on Atom in that it’s an Atom package, but its PHP code can easily be extracted and applied to another editor with hooks that make integration possible.

它目前是Atom软件包,因此依赖于Atom,但是可以很容易地提取其PHP代码并将其应用到其他具有挂钩功能的编辑器中,以使集成成为可能。

It could use some more features on the Atom side, but it could also use a fork or two turning it into an editor-agnostic package that can be easily applied to any other IDE. Another idea – why not make it work with Docker out of the box, helping people avoid having to have PHP installed on their host operating systems? Dive in!

它可以在Atom端使用更多功能,但也可以使用fork或2将其转换为与编辑器无关的程序包,可以轻松地将其应用于任何其他IDE。 另一个想法–为什么不立即使用它与Docker一起使用,从而帮助人们避免在其主机操作系统上安装PHP? 潜入!



florianv /交换器 [7★] (florianv/exchanger [7 ★])

This package is a “currency exchange framework”, meaning it’s used to develop currency exchange packages. Think of it as a standard to help you with developing your own interchangeable currency exchange package.

该软件包是“货币交换框架”,意味着它用于开发货币交换软件包 。 将其视为帮助您开发自己的可互换货币兑换包的标准。

One interesting implementation of this “framework” is the popular Swap package by the same author.

该“框架”的一个有趣实现是同一作者流行的Swap软件包。

While both packages are quite mature, Exchanger could use a little more love.

虽然这两个软件包都相当成熟,但Exchanger可以多加一些爱。

By the way, if you’re interested in writing about Exchanger and demonstrating the framework’s power, get in touch – we’re looking!

顺便说一句,如果您有兴趣撰写有关Exchanger的文章并演示框架的功能,请与我们联系-我们在寻找!



rinvex /国家 [383★] (rinvex/country [383 ★])

As the description says:

如描述所述:

Rinvex Country is a simple and lightweight package for retrieving country details with flexibility. A whole bunch of data including name, demonym, capital, iso codes, dialling codes, geo data, currencies, flags, emoji, and other attributes for all 250 countries worldwide at your fingertips

Rinvex Country是一个简单轻巧的软件包,可灵活地检索国家/地区详细信息。 全世界所有250个国家/地区的一整套数据,包括名称,地名,大写,iso代码,拨号代码,地理数据,货币,标志,表情符号和其他属性

Example:

例:

use Rinvex\Country\Models\Country;

// Find a country by it's ISO 3166-1 alpha-2
$egypt = (new Country)->find('EG');

// Find a country by one of it's attributes
$usa = (new Country)->findBy('capital', 'Washington D.C.');

// Find all countries
$countries = (new Country)->findAll();

// Retrieve only `name`, `demonym`, and `currency` attributes of "Japan":
$japan = (new Country)->find('JP', ['name', 'demonym', 'currency']);

// Utilize Laravel Collections to get an array of all country names, with their 'iso_3166_1_alpha2' as the array keys
$allCountries = (new Country)->findAll()->pluck('name.common', 'iso_3166_1_alpha2');

As someone who’s building two separate geo-aware apps at the moment, I can definitely appreciate this package – it makes things much easier in regards to common country information.

作为目前正在构建两个独立的地理感知应用程序的人,我肯定会喜欢此软件包–它使有关共同国家/地区信息的事情变得更加容易。

Due to its versatile documentation and excellent code quality score, the library already sports some decent adoption, but could still use more users and more contributors. Can you help out? There are also some issues you can tackle right now!

由于其通用的文档和出色的代码质量得分,该库已经获得了不错的采用,但仍可以使用更多的用户和更多的贡献者。 你能帮忙吗? 您现在还可以解决一些问题



ScriptFUSION /地图 [7★] (ScriptFUSION/Mapper [7 ★])

I honestly have no idea what this is or what I’d use it for, but Ocramius praised so I included it in the list.

老实说,我不知道这是什么或用途,但是Ocramius赞扬了,因此将其包括在列表中。

If you feel like you can explain what this is to total newbies, please get in touch and we’ll pay you for the post.

如果您觉得可以解释这对新手有什么影响,请与我们取得联系,我们将为您支付该职位的费用。



lufficc / laravel-blog [164★] (lufficc/laravel-blog [164 ★])

A Laravel 5.3 blog system! Judging by the feedback, it’s quite good, but could definitely use more features. Why not chime in and help out?

Laravel 5.3博客系统! 从反馈来看,这是相当不错的,但肯定可以使用更多功能。 为什么不鸣叫并帮忙呢?

Let us know if you do – we’d love a thorough analysis!

让我们知道您是否愿意-我们希望您进行详尽的分析!



花冠/ PSR6-ProfileCachePool / [9★] (Corollarium/PSR6-ProfileCachePool/ [9 ★])

Do you use PSR-6 cache? If so, you might be interested in this profiler which monitors how many hits and misses your cache implementation gets. It’s not really useful unless you’re noticing some discrepancies and want to debug, but it’s here if you need it!

您是否使用PSR-6缓存? 如果是这样,您可能对此监视程序感兴趣,该监视程序监视您的缓存实现获得了多少次命中和未命中。 除非您注意到一些差异并要调试,否则它并不是真正有用的,但是如果需要,它就在这里!

Why not contribute to the package by adding some more report formats (animated graphs?) or other statistics to track?

为什么不通过添加更多报告格式(动画图?)或其他要跟踪的统计信息来为软件包做出贡献?



That’s it for September – as always, please throw your links at us with the #sourcehunt hashtag! Now go forth and Hack through Hacktober! Let us know what you did and happy coding!

九月就这样了–与往常一样,请使用#sourcehunt标签向我们扔您的链接! 现在,通过Hacktober破解! 让我们知道您所做的一切,并祝您编程愉快!

翻译自: https://www.sitepoint.com/sourcehunt-september-hacktoberfest-edition/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值