Sourcehunt 17.1:值得关注的7个有趣PHP软件包

作者:神秘网友 发布时间:2020-09-04 19:54:25

Sourcehunt 17.1:值得关注的7个有趣PHP软件包

Sourcehunt 17.1:值得关注的7个有趣PHP软件包

Could it be this is only this year’s first sourcehunt? Seems longer, especially given what’s on offer this time around, but ¯_(ツ)_/¯

难道这只是今年的首次寻源活动 ? 似乎更长,特别是考虑到这次提供的东西,但是__(ツ)_ /

If you’re new to Sourcehunt, it’s our monthly post for promoting open source projects that seem interesting or promising and could use help in terms of Github stars or pull requests. It’s our way of giving back – promoting projects that we use (or could use) so that they gain enough exposure to attract a wider audience, a powerful community and, possibly, new contributors or sponsors.

如果您是Sourcehunt的新手,这是我们的月度帖子,用于推广看起来有趣或有前途的开源项目,这些项目可以在Github明星或请求请求方面使用帮助。 这是我们回馈的方式-推广我们使用(或可以使用)的项目,使它们获得足够的曝光度,以吸引更广泛的受众,强大的社区,并可能吸引新的贡献者或赞助者。

Without further ado, let’s dive into this month’s offering.

事不宜迟,让我们深入了解本月的产品。

Sourcehunt 17.1:值得关注的7个有趣PHP软件包

dannyvankooten / vat.php [162★] (dannyvankooten/vat.php [162 ★])

As per their documentation:

根据他们的文档:

vat.php is a simple PHP library which helps you to deal with European VAT rules. It helps you…

vat.php是一个简单PHP库,可帮助您处理欧洲增值税规则。 它可以帮助您...

  • Grab up-to-date VAT rates for any European member state

    获取任何欧洲成员国的最新增值税率
  • Validate VAT numbers (by format or existence)

    验证增值税号(按格式或存在)
  • Work with ISO 3166-1 alpha-2 country codes and determine whether they’re part of the EU.

    使用ISO 3166-1 alpha-2国家/地区代码,并确定它们是否属于欧盟。
  • Geolocate IP addresses

    定位IP地址
  • The library uses jsonvat.com to obtain its data for the VAT rates.

    该库使用jsonvat.com来获取其增值税率数据。

The library is little more than an API proxy to jsonvat.com, with added utility functions. However, those utility functions and the ease of use of this lib make it a valuable addition to any e-commerce site’s vendor directory. It even supports checking general country data, like so:

该库仅是jsonvat.com的API代理,带有附加的实用程序功能。 但是,这些实用程序功能和此lib的易用性使其成为任何电子商务网站的供应商目录的宝贵补充。 它甚至支持检查常规国家/地区数据,如下所示:

$countries = new DvK\Vat\Countries();
$countries->all(); // array of country codes + names
$countries->name('NL') // Netherlands
$countries->europe(); // array of EU country codes + names
$countries->inEurope('NL'); // true
$countries->ip('8.8.8.8'); // US


Microsoft / tolerant-php-parser [210★] (Microsoft/tolerant-php-parser [210 ★])

Microsoft? Do they really need promotion/help? Well, due to the nature of the package and its implied usefulness, I vote yes.

微软? 他们真的需要晋升/帮助吗? 好吧,由于该软件包的性质及其隐含的实用性,我投赞成票。

Tolerant PHP Parser is intended for use with IDEs to check the code by generating an AST (abstract syntax tree). Two main qualities (or planned qualities, as it’s very early still) are the fact that it is error tolerant, so doesn’t return a fully broken AST when incomplete code is detected (by default, most code in an IDE will be incomplete because it’s in the process of being written), and the fact that it is written in PHP but built with IDEs in mind. The latter is especially handy because it lets the PHP community itself contribute to a parser that verifies their own code, and works on a bunch of IDEs out of the box, rather than waiting for the dev team of a particular IDE to apply a fix.

宽容PHP解析器旨在与IDE一起使用,以通过生成AST(抽象语法树)来检查代码。 它具有两个主要特性(或计划特性,因为它还很早),即它是容错的,因此当检测到不完整的代码时,它不会返回完全损坏的AST(默认情况下,IDE中的大多数代码将不完整,因为它正在编写过程中),而且事实是它是用PHP编写的,但要考虑到IDE的构建。 后者特别方便,因为它使PHP社区本身可以为解析器提供帮助,以验证其自身的代码, 并且可以直接使用大量IDE,而不必等待特定IDE的开发团队应用修补程序。

The tool is in active development, and the team are looking for help with getting it to its final form – this is not a one-off experiment package that’ll be abandoned as soon as the author gets a new gig. This is a dedicated tool with loads of potential, and it deserves our attention. Check it out!

该工具正在积极开发中,团队正在寻求帮助,以使其最终形成形式-这不是一个一次性的实验软件包,一旦作者获得新的演奏会就将其放弃。 这是一个有潜力的专用工具,值得我们注意。 看看这个!



php-enqueue / enqueue-dev [103★] (php-enqueue/enqueue-dev [103 ★])

Enqueue is an “enterprise queue system” for PHP. From the very first glance, it’s quite obvious that the author means serious business with this package – the development repository is where all development happens. Production versions are published separately as read only, containing subsets of what was developed in the development repo.

Enqueue是PHP的“企业队列系统”。 乍一看,很明显,作者使用这个软件包意味着认真的工作–开发资料库是进行所有开发的地方。 生产版本单独发布为只读,其中包含开发库中开发的内容的子集。

We’ve dealt with queues quite a bit here at SitePoint, but always with a specific implementation for a specific purpose. What Enqueue offers is a no-nonsense abstracted queueing package with multiple protocols supported out of the box, and applicable to any framework, app, or CMS. For Symfony fans, a bundle is provided out of the box, but it’s in no way a Symfony-only thing.

我们已经处理了队列颇有几分这里SitePoint,但总是有特定目的的特定实现。 Enqueue提供的是一个无废话的抽象排队包,具有开箱即用支持的多种协议,适用于任何框架,应用程序或CMS。 对于Symfony粉丝,提供了一个现成的捆绑包,但这绝不是Symfony专用的东西。

If you’re not familiar with queues, it’s a bit hard to explain in a few short paragraphs, so I recommend you read the quick tour and well written docs here.

如果您不熟悉队列,那么在简短的几段中就很难解释了,因此,我建议您在此处阅读快速入门和写得很好的文档。

The repo has some (at first glance) relatively easily solvable issues, so if you’re feeling up to it go and get your contribution score up, and if you’d like to give it a spin don’t forget to ping us – we’d love to pay you for a tutorial and help the library with more exposure that way.

回购协议存在一些(乍看之下)相对容易解决的问题,因此,如果您愿意接受,可以提高您的贡献分数,并且如果您愿意试一试,请不要忘记对我们进行ping操作-我们很乐意为您支付教程费用,并通过这种方式帮助图书馆提供更多的展示机会。



vimeo /诗篇 [243★] (vimeo/psalm [243 ★])

Another big name product, Psalm is a static analyzer for PHP in the spirit of Phan and others which will analyze your PHP code as your write it (or on demand) and output some discrepancies and errors it may have found.

另一个著名的产品,Psalm是Phan等人的精神,它是用于PHP的静态分析器,它将在编写(或按需)分析PHP代码时输出可能发现的差异和错误。

There’s not much more to say other than that it’s dead easy to use, and is an ongoing development project that would welcome your help. Go check it out!

除了它非常易于使用之外,没有什么要说的了,这是一个正在进行的开发项目,将欢迎您的帮助。 去看看吧!



Waxim /代金券 [43★] (waxim/vouchers [43 ★])

Vouchers is a library for creating and validating vouchers.

凭单是用于创建和验证凭单的库。

Need to generate a discount code for an online product? A code for accessing a shared file? A promo code for referral tracking? Voucher can help.

是否需要为在线产品生成折扣代码? 用于访问共享文件的代码? 用于推荐跟踪的促销代码? 凭证可以提供帮助。

The library makes no assumptions about storage, meaning they don’t care about how you do it – the authors don’t force any particular storage mechanism down your throat, which makes the whole thing that much more powerful and universally applicable.

该库不对存储做任何假设,这意味着他们并不关心您的存储方式-作者不会强迫您使用任何特定的存储机制,这使整个功能变得更加强大且普遍适用。

There are no issues to help out with at the time of this writing, but they could use help with documentation and a tutorial or two, so if you’re feeling up to it, we’ve got the budget to cover you!

在撰写本文时,没有任何需要解决的问题,但是他们可以在文档和一本或两本教程中使用帮助,因此,如果您愿意的话,我们已经为您提供预算!



https://github.com/themsaid/laravel-mail-preview [374★] (https://github.com/themsaid/laravel-mail-preview [374 ★])

Short and to the point – this package lets you “send” emails from your Laravel app to your local hard drive. Whether that’s for static-file backup purposes, or HTML previews that can easily be version controlled and forwarded to QA, doesn’t matter.

简短而要点–此软件包可让您将Laravel应用中的电子邮件“发送”到本地硬盘。 无论是出于静态文件备份的目的,还是可以轻松地进行版本控制并将其转发给QAHTML预览,都没有关系。

There are some minor issues that need taking care of (mainly Laravel version compatibility things), the package not really being brand new, but all in all it’s production-ready and just needs tutorials and more examples.

有一些小问题需要注意(主要是Laravel版本兼容性方面的问题),该软件包并不是真正全新的,但总的来说,它已经可以投入生产,并且只需要教程和更多示例。

Perhaps you can even think of a feature or two to add?

也许您甚至可以想到要添加的一两个功能?



https://github.com/JordanRL/Fermat [12★] (https://github.com/JordanRL/Fermat [12 ★])

A library providing math and statistics operations for numbers of arbitrary size

提供针对任意大小的数学和统计运算的库

Sound familiar? Maybe because of this? Yes, there are some other libraries taking care of some of this, but that doesn’t mean there’s no room for innovation – every new player brings some insight to the table, and this nifty modern library is, in fact, quite mature and stable.

听起来有点熟? 也许因为这个 ? 是的,还有其他一些图书馆正在处理这些问题,但这并不意味着没有创新的空间–每个新玩家都可以提供一些见识,而这个漂亮的现代图书馆实际上是相当成熟和稳定的。

I’ll be demoing this library in a project soon, but in the meanwhile, before diving in, please keep in mind the following caveat:

我很快将在一个项目中对该库进行演示,但是与此同时,在深入之前,请记住以下警告:

This library implements certain constants (Pi, Tau, Euler’s Number, and the Golden Ratio) as hardcoded constants out to 100 digits. Because many of the functions it performs (such as logarithms and trigonometry functions) depend on these constants, this library is not actually truly arbitrary precision. Instead, you can work with numbers that are accurate out to 100 decimal places, and you can calculate trigonometry functions out to 99 decimal places.

该库将某些常量(Pi,Tau,欧拉数和黄金分割率)实现为100位硬编码常量。 因为它执行的许多功能(例如对数和三角函数)都取决于这些常量,所以该库实际上并不是真正的任意精度。 取而代之的是,您可以使用精确到小数点后100位的数字,并且可以计算出99个小数点后的三角函数。



That’s it for January. Found anything you could sink your teeth into?

一月就这样。 发现什么可以让您的牙齿陷入其中?

As always, please throw your links at us with the #sourcehunt hashtag! If you build something with the projects we’ve mentioned, or if you submit an elaborate pull request you’d like to talk about, give us a shout and we’ll make sure the world knows about it!

与往常一样,请使用#sourcehunt标签将您的链接扔给我们! 如果您使用我们提到的项目构建项目,或者提交您想谈论的详尽请求请求,请向我们喊叫,我们将确保全世界都知道!

Happy coding!

祝您编码愉快!

翻译自: https://www.sitepoint.com/7-new-or-interesting-php-packages-to-keep-an-eye-on/

Sourcehunt 17.1:值得关注的7个有趣PHP软件包相关教程

  1. oauth访问不到静态文件_Sourcehunt会议Slim中的Oauth2静态分析器
  2. Sourcehunt:仅PHP7替代Laravel,HPKP等
  3. Sourcehunt-Swift Edition-2017年3月
  4. php加密验证_Sourcehunt PHP:有助于加密,验证,付款…
  5. 砥砺前行坚持创新BiHangCoin打造值得信赖的数字资产交易平台
  6. 简历怎么包装crm_家庭CRM,狂饮包装和PHP机器学习? Sourcehunt
  7. ads-b开源_Sourcehunt-开源周刊
  8. ftp服务器软件细数三款值得推荐的ftp服务器软件