Site News: Blast from the Past – One Year Ago in PHP (05.21.2020)

Here's what was popular in the PHP community one year ago today:

PHP Internals News: Episode 54: Magic Method Signatures

PHP Internals News: Episode 54: Magic Method Signatures

In this episode of "PHP Internals News" I chat with Gabriel Caruso (Twitter, GitHub, LinkedIn) about the "Ensure correct signatures of magic methods" RFC.

The RSS feed for this podcast is https://derickrethans.nl/feed-phpinternalsnews.xml, you can download this episode's MP3 file, and it's available on Spotify and iTunes. There is a dedicated website: https://phpinternals.news

Transcript

Derick Rethans 0:16

Hi, I'm Derick, and this is PHP internals news, a weekly podcast dedicated to demystifying the development of the PHP language. This is Episode 54. Today I'm talking with Gabriel Caruso about his ensure correct signatures of magic methods RFC. Hello Gabriel, would you please introduce yourself?

Gabriel Caruso 0:37

Hello Derick and hello to everyone as well. My name is Gabriel. I'm from Brazil, but I'm currently in the Netherlands. I'm working in a company called Usabila, which is basically a feedback company. Yeah, let's talk about this new RFC for PHP eight.

Derick Rethans 0:52

Yes, well, starting off at PHP eight. Somebody told me that you also have some other roles to play with PHP eight.

Gabriel Caruso 0:59

Yeah, I think last week I received the news that I'm going to be the new release manager together with Sara. We're going to basically take care of PHP eight, ensuring that we have new versions, every month that we have stable versions every month free of bugs, we know that it's not going to happen.

Derick Rethans 1:17

That's why there's a release cycle with alphas and betas.

Gabriel Caruso 1:20

Yeah.

Derick Rethans 1:21

I've been through this exactly a year early, of course, because I'm doing a seven four releases.

Gabriel Caruso 1:25

Oh, nice. Yeah. So I'm gonna ask a lot of questions for you.

Derick Rethans 1:29

Oh, that's, that's fine. It's also the role of the current latest release manager to actually kickstart the process of getting the PHP, in this case, PHP eight release managers elected. Previously, there were only very few people that wanted to do it. So in for the seven four releases it was Peter and me. But in your case, there were four people that wanted to do it, which meant that for the first time I can ever remember we actually had to hold some form of election process for it. That didn't go as planned because we ended up having a tie twice, which was interesting. So we had to run a run off election for the second person between you and Ben Ramsey, that's going to go continuing for you for the next three and a half years likely.

Gabriel Caruso 2:11

Yep.

Derick Rethans 2:12

So good luck with that.

Gabriel Caruso 2:13

Thank you. Thank you very much.

Derick Rethans 2:15

In any case, let's get back to the RFC that we actually wanted to talk about today, which is the ensure correct signatures of magic methods RFC. What are these magic methods?

Gabriel Caruso 2:24

So PHP, let's say out of the box, gives the user some magic methods that every single class have it. We can use that those methods for anything, but basically, what magic methods are are just methods that are called by PHP w

Truncated by Planet PHP, read more at the original (another 20573 bytes)

Dealing with Terrible Business Ideas from Your Clients

If you’ve ever attempted to read up on or start your own business, you’ll likely have come across this encouraging nugget of information – the one that says upwards of 90% of new businesses fail within the first five years.

That’s pretty alarming, but even more alarming is when you’re the designer chosen to create content for one of these entrepreneurial turkeys. It can be really tough when a client suddenly runs out of money and has to default on your payment for a project. Yes, you can sue them, but unless business suddenly picks up (or they have incredibly wealthy parents), you’d probably be wasting your time.

Knowing how to spot a business idea that is not going to work, or how to tell when a particular business relationship looks rickety and on the brink of collapse is an important skill for any designer to learn, particularly if you work with new startups.

The Good, the Bad, and the Crazy

There are a lot of upsides to working with new businesses – the energy and enthusiasm among the members of the team is contagious, and if you’re a designer getting in on the ground floor of a successful venture, you can find yourself in a very enviable position within the company in just a few years. However, if things go south, it can turn into a nightmare if you didn’t see it coming.

It’s helpful to know something about business yourself if you plan on working with startups. There are plenty of books to read, but in my opinion, the best way to learn about business is to start one yourself. Not only does it make sense financially for designers to have a side business, but the knowledge you gain from doing so will also be extremely valuable in your future dealings with entrepreneurial clients.

Technically, if you’re a freelancer, you’re already running your own small business, but even if you’re working in-house, it can be extremely valuable to learn the ins and outs of business. Even if you fail – especially if you fail – you’ll learn what works and what doesn’t, and why.

designer startup meeting conference room

Be wary of business ideas that sound too strange or that don’t seem to make any sense. Does the idea sound just a bit too perfect, unique, and lucrative? Watch out. Anything that sounds too good to be true probably is.

Also to be avoided: businesses that don’t have any real competition or market equity. If the waters are too quiet, that’s a bad sign. It usually means that there’s no market for what the business is selling.

Perhaps counterintuitively, business ideas that seem to be unoriginal or that are jumping on a current trend actually have a better chance of doing well than unique businesses with little or no competition. Why? Because popular industries are more profitable, for obvious reasons. More people interested means there’s more money to be made.

This is why nobody is attempting to come up with a completely new, original alternative to the automobile – they work with what’s already popular and what already makes money. Reinventing the wheel is usually more trouble than it’s worth (except when it’s not, but chances are you won’t encounter anyone who manages to pull it off successfully).

working laptop developer conference desk

Stop, Look, and Listen

Something every designer needs to know to avoid getting tangled up in business disasters is how to properly observe a potential client. It can be difficult to tell in the first meeting with a potential client whether their business will be a flop, particularly if you haven’t been freelancing for long.

But if you allow someone to do the majority of the talking for at least 5-10 minutes, you will learn more than perhaps you ever wanted to about that person’s behavior, management style, personality, and feelings about their mother-in-law.

People love to talk about themselves, and as a designer on the lookout for danger, this can be your best advantage. Listen far more than you talk – ask questions that encourage the client to reveal more information. Interview your potential client as much as they’re interviewing you.

man talking hands laptop

False Friends

Sometimes, a business seems perfect. The idea is solid, the market is strong, and competition is at a healthy level. These kinds of businesses can catch you off guard the most when they go south, because everything seemed okay on the surface.

But chances are, even these surprising failures have warning signs that show themselves well before you ever sign on to do any work. This is where it’s helpful to know the signs of detrimental management – why certain business owners and managers are successful and why others seem to cause chaos and turmoil wherever they go.

When meeting with a prospective entrepreneur client, take careful note of their demeanor and speaking style, specifically how they talk about their current or past employees or freelancers. If someone is trash-talking their people or uses too much personal praise (as opposed to team-oriented praise, which includes the entire group), that’s something to be wary of. It doesn’t always mean the company will go belly up, but it certainly won’t help matters.

Another type of red flag is clients who seem to have no regard for any type of budget. One of the top reasons many businesses fail is because of a lack of strict budgeting and an excess of profligate spending. If your small business client asks for work that you both know will cost an exorbitant amount of money, they’re probably not going to be a long-term client.

Moderation is what you want to look for when shopping for steady, repeat clients. You want someone who is financially responsible (but not cheap) and understands the budgeting required for a small business to be successful past the five-year mark.

Conclusion

Even if you don’t personally get caught up in the financial fallout of a bad business sinking to the bottom of the ocean, you want to avoid attaching your name as a designer to too many failed commercial ventures. It doesn’t look good on your resume, and once you encounter a genuinely successful startup, they will take one look at your track record and immediately draw conclusions about your involvement in each fiasco.

You may have had nothing to do with the company taking a nosedive, but your name was thrown into the mix, and that makes you a suspect. They may even see you as a “bad luck charm” – people are more superstitious than you would believe.

Successful businesses don’t want to invite freelancers or employees who may bring about failure. So it’s important to cultivate your intuition when it comes to bad businesses.

Learn how to spot bad ideas when you see them and avoid becoming the opposite of a designer rabbit’s foot!

The post Dealing with Terrible Business Ideas from Your Clients appeared first on Speckyboy Design Magazine.

Announcing “Thinking Functionally in PHP”

Announcing "Thinking Functionally in PHP"

Calling all PHP developers! Want to wrap your brain around functional programming? Are you sick of reading tutorials about this magic "monad" thing but having no idea how to read Haskell? Then this book is for you.

Announcing Thinking Functionally in PHP, by yours truly, available now on LeanPub.

Continue reading this post on PeakD

Larry 20 May 2020 - 9:16am

PHP Readme Helper (New)

Package:
Summary:
API documentation generator for README files
Groups:
Author:
Description:
This package can be used as an API documentation generator for README files...

Read more at https://www.phpclasses.org/package/11650-PHP-API-documentation-generator-for-README-files.html

Part 2: Code Is The Most Expensive Solution

Editor’s Note: This is the second in a five-part series on refactoring and modernizing PHP applications. If you were to identify the most expensive part of any development project, what would that part be? The planning phase? Acquiring copyright or intellectual property? Marketing and advertising? All of these would be wrong. The most expensive part […]

The post Part 2: Code Is The Most Expensive Solution appeared first on BrandonSavage.net.

Community News: Latest PECL Releases (05.19.2020)

Latest PECL Releases:

  • datadog_trace 0.45.1
    ### Fixed

    • Fix uncaught exceptions with auto flushing enabled #882
    • Prevent curl and guzzle from inheriting top level app name #885
    • Change PDO service name to lowercase #886
  • phalcon 4.0.6
    Full changelog can be found at: https://github.com/phalcon/cphalcon/blob/master/CHANGELOG-4.0.md

    [4.0.6]

    Added

    Changed

    • Changed Volt::convertEncoding to no longer using iconv for a fallback since it causes issues with macOS #14912
    • Changed schema manipulation in PhalconDbDialectMysql - unquote numerical defaults #14888, #14974
    • Changed the default ACL access level from boolean FALSE to Enum::DENY #14974
    • Changed the way PhalconHttpResponse::__construct checks content data type. Now a TypeError will be thrown if incompatible data type was passed #14983
    • Changed return type hints of the following PhalconFlashFlashInterface's methods: error, message, notice, success and warning #14994
    • Changed return type hint for PhalconMvcModelInterface::sum #15000
    • Changed return type for PhalconMvcModelCriteria::getLimit so that integer, NULL or array will be returned #15004
    • Changed return type hint for PhalconMvcModelManager::getCustomEventsManager to return NULL instead of boolean FALSE if there is no special events manager #15008
    • Changed PhalconMvcModelMetaData::getDI so that now it will throw a PhalconMvcModelException if there is no DiInterface instance #15011
    • Changed PhalconHttpRequest::getJsonRawBody to use json_decode instead of PhalconJson::decode #14936
    • Changed PhalconFactoryAbstractFactory to expose getService which will throw an exception if it does not exist. Removed checkService and adjusted all references in newInstance() calls. #15038
    • Changed the visibility of methods and properties in PhalconHttpMessageResponse, PhalconHttpMessageServerRequest and PhalconHttpMessageUri to work with clone. #15040

    Fixed

    • Fixed PhalconMvcModelQueryBuilder::getPhql to add single quote between string value on a simple condition #14874
    • Fixed recognizing language operators inside Volt's echo mode ({{ ... }}) #14476
    • Fixed Tag::friendlyTitle to correctly convert titles under MacOS and Windows #14866
    • Fixed the Volt compiler to no longer parse cache fragments and thus searching for the viewCache service (deprecated for v4) #14907
    • Fixed IN operator precedence in Volt #14816
    • Fixed testing suite to work with PHPUnit 9 when we upgrade #14837
    • Fixed return type hints of the following PhalconAclAbstractAdapter's methods: getActiveAccess, getActiveRole and getActiveComponent #14974
    • Fixed default value of the following PhalconAnnotationsAnnotation's properties: $arguments and $exprArguments #14977
    • Fixed return type hints of the following PhalconAnnotationsAnnotation's methods: getArgument, getName and getNamedArgument #14977
    • Fixed incorrect return type hint for PhalconHttpResponseCookies::setSignKey #14982
    • Fixed return type hints for PhalconConfigConfigFactory::load and PhalconConfigConfigFactory::newInstance to explicitly indicate the return type as PhalconConfig instance #14978
    • Fixed return type hints for the following methods #14987:
      • PhalconDispatcherAbstractDispatcher::dispatch
      • PhalconDispatcherDispatcherInterface::dispatch
      • PhalconFilter::get
      • PhalconHttpMessageAbstractCommon::cloneInstance
      • PhalconHttpMessageAbstractCommon::processWith
      • PhalconHttpMessageAbstractMessage::withAddedHeader
      • PhalconHttpMessageAbstractMessage::withBody
      • PhalconHttpMessageAbstractMessage::withHeader
      • PhalconHttpMessageAbstractMessage::withProtocolVersion
      • PhalconHttpMessageAbstractMessage::withoutHeader
      • PhalconHttpMessageAbstractRequest::withMethod
      • PhalconHttpMessageAbstractRequest::withRequestTarget
      • PhalconHttpMessageAbstractRequest::withUri
      • PhalconMvcModelBinder::findBoundModel
      • PhalconValidation::getEntity
      • PhalconValidationValidationInterface::getEntity
    • Fixed default value of PhalconCrypt::$key to satisfy the interface #14989
    • Fixed return type hint for PhalconDi::getInternalEventsManager #14992
    • Fixed return type hints of the following PhalconFlashAbstractFlash's methods: error, notice, success and warning #14994
    • Fixed return type hint for PhalconTranslateInterpolatorFactory::newInstance #14996
    • Fixed return type hint for PhalconMvcModel::sum #15000
    • Fixed return type hint for PhalconMvcModelCriteriaInterface::getLimit and PhalconMvcModelCriteria::getLimit to follow documentation and original purpose #15004
    • Fixed return type hint for PhalconMvcModel::count and PhalconMvcModelInterface::count to reflect original behavior #15006
    • Fixed return type hint for PhalconMvcModel::getEventsManager to reflect original behavior #15008
    • Fixed return type hint for PhalconMvcModel::average and PhalconMvcModelInterface::average to reflect original behavior #15013
    • Fixed return type hint for PhalconMvcModelMetaData::getColumnMap and PhalconMvcModelMetaData::getReverseColumnMap to reflect original behavior #15015
    • Fixed return type hint for PhalconMvcModelMetaDataInterface::getColumnMap and PhalconMvcModelMetaDataInterface::getReverseColumnMap to reflect original behavior #15015
    • Fixed return type hint for PhalconMvcModelCriteriaInterface::getColumns and PhalconMvcModelCriteria::getColumns to reflect original behavior #15017
    • Fixed return type hint for PhalconDbColumn::getSize and PhalconDbColumnInterface::getSize to reflect original behavior #15019
    • Fixed return type hint for PhalconDbColumn::getAfterPosition and PhalconDbColumnInterface::getAfterPosition to reflect original behavior #15021
    • Fixed return type hint for PhalconMvcModelManager::executeQuery and PhalconMvcModelManager::ManagerInterface to reflect original behavior #15024
    • Fixed return type hint for PhalconMvcModelResultset::getFirst and PhalconMvcModelResultsetInterface::getFirst to reflect original behavior #15027
    • Rollback the regression changes for PhalconMvcModelQuery::_prepareSelect to properly prepare a SQL SELECT statement from a PHQL one #14657
    • Fixed SerializerInterface usage for PhalconMvcModelResultsetComplex::unserialize as well as PhalconMvcModelResultsetComplex::unserialize #14942

    Removed

    • Removed PhalconTranslateInterpolatorFactory::$mapper as well as PhalconTranslateInterpolatorFactory::$services in favor of PhalconFactoryAbstractFactory ones #15036
  • protobuf 3.12.0
    GA release.
  • yaf 3.2.3
    - Fixed issue #482 (segfault if plugin doesn't defines all hooks) - Fixed issue #481 (application.system.yaf.directory has no effect)
  • yac 2.2.1
    - Refactor key manipulation, avoding memory allocation - Refactor Yac::__set/__get by using native objects_handler
  • skywalking 3.3.0
    Added memcache collection and skywalking 8.0 support
  • protobuf 3.12.0RC2
    GA release.
  • datadog_trace 0.45.0
    ## Important behavior changes in this release If you are using `dd_trace`, `dd_trace_function`, or `dd_trace_method` then you need to call these functions before the first invocation of the target e.g. `dd_trace('foo', ...)` should be done before `foo` is called for the first time.

    Changed

    • Compile to one single file #840, #874
    • Simplify configuration #833, #870
    • Refactor module blacklist #852
    • Cache that a function is not traced #854, #863
    • Simplify spl_autoload_register instrumentation #867
    • Use normalized URL as the resource name for curl #869 (thanks, @akdh!)
    • Sandbox header and http_response_code #875

    Fixed

    • Fix variadic args with empty function signature #872
    • Bump phpstan to 0.12 and fix issues #841
Powered by Gewgley