Jeśli jesteś właścicielem tej strony, możesz wyłączyć reklamę poniżej zmieniając pakiet na PRO lub VIP w panelu naszego hostingu już od 4zł!

Archive for Kwiecień, 2017

Community News: Latest PECL Releases (04.25.2017)

Community News: Latest PECL Releases (04.25.2017)

Latest PECL Releases:

  • v8js 1.4.0
    Correctly initialize V8’s ICU component

    • path to libv8 library is now baked into the library to find icudtl.dat file
    • if icudtl.dat file is moved after compile time, set v8js.icudtl_dat_path php.ini variable
  • v8 0.1.4
    This release adds low-level optimizations, simplify some internal methods and fix few bugs. For more details see change list below.

    As of this release, V8 >= 6.0.45 required.

      • BC-breaking or potentially BC-breaking changes

    Changes to public API and other important changes which may affect end-user:

    - Raise libv8 required version to 6.0.45;
    - Add V8Value::InstanceOf() method;
    - Add V8ObjectValue::SetNativeDataProperty() method;
    - Add V8PropertyFilter, V8KeyCollectionMode and V8IndexFilter enums;
    - Add property filtering support to V8ObjectValue::Get{Property,OwnProperty}Names();
    - Consistently expose all well-known symbols on V8SymbolValue;
    - Setting boolean props on StackFrame with valid type;
    - Remove non-working and non-supporting $attributes argument from V8StringValue constructor in stubs;
    - * Add V8ConstructorBehavior and support for it in V8FunctionTemplate constructor;
    - * Add signature support in V8FunctionTemplate constructor via $receiver;
    - * Add signature support to Template:SetNativeDataProperty() and ObjectTemplate::SetAccessor() via $receiver;
    - * Remove require $isolate parameter from V8Value::TypeOf();
    - * Remove deprecated V8Context::EstimatedSize() method;
    - * Remove deprecated V8StackTraceStackTraceOptions;
    - * Remove deprecated V8StackTrace::AsArray();
    - * Require Context explicitly in V8Isolate::ThrowException();
    - * Rename V8ExceptionsGenericException to V8ExceptionsException;
    - * Rename V8ExceptionsAbstractResourceLimitException to V8ExceptionsResourceLimitException;
    - internal: Check whether returned context is empty in V8IsolateGetEnteredContext() instead of checking InContext();
    

Source: http://www.phpdeveloper.org/news/25133

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Community News: Latest PECL Releases (04.25.2017)

Community News: Latest PECL Releases (04.25.2017)

Latest PECL Releases:

  • v8js 1.4.0
    Correctly initialize V8’s ICU component

    • path to libv8 library is now baked into the library to find icudtl.dat file
    • if icudtl.dat file is moved after compile time, set v8js.icudtl_dat_path php.ini variable
  • v8 0.1.4
    This release adds low-level optimizations, simplify some internal methods and fix few bugs. For more details see change list below.

    As of this release, V8 >= 6.0.45 required.

      • BC-breaking or potentially BC-breaking changes

    Changes to public API and other important changes which may affect end-user:

    - Raise libv8 required version to 6.0.45;
    - Add V8Value::InstanceOf() method;
    - Add V8ObjectValue::SetNativeDataProperty() method;
    - Add V8PropertyFilter, V8KeyCollectionMode and V8IndexFilter enums;
    - Add property filtering support to V8ObjectValue::Get{Property,OwnProperty}Names();
    - Consistently expose all well-known symbols on V8SymbolValue;
    - Setting boolean props on StackFrame with valid type;
    - Remove non-working and non-supporting $attributes argument from V8StringValue constructor in stubs;
    - * Add V8ConstructorBehavior and support for it in V8FunctionTemplate constructor;
    - * Add signature support in V8FunctionTemplate constructor via $receiver;
    - * Add signature support to Template:SetNativeDataProperty() and ObjectTemplate::SetAccessor() via $receiver;
    - * Remove require $isolate parameter from V8Value::TypeOf();
    - * Remove deprecated V8Context::EstimatedSize() method;
    - * Remove deprecated V8StackTraceStackTraceOptions;
    - * Remove deprecated V8StackTrace::AsArray();
    - * Require Context explicitly in V8Isolate::ThrowException();
    - * Rename V8ExceptionsGenericException to V8ExceptionsException;
    - * Rename V8ExceptionsAbstractResourceLimitException to V8ExceptionsResourceLimitException;
    - internal: Check whether returned context is empty in V8IsolateGetEnteredContext() instead of checking InContext();
    

Source: http://www.phpdeveloper.org/news/25133

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Community News: Latest PECL Releases (04.25.2017)

Community News: Latest PECL Releases (04.25.2017)

Latest PECL Releases:

  • v8js 1.4.0
    Correctly initialize V8’s ICU component

    • path to libv8 library is now baked into the library to find icudtl.dat file
    • if icudtl.dat file is moved after compile time, set v8js.icudtl_dat_path php.ini variable
  • v8 0.1.4
    This release adds low-level optimizations, simplify some internal methods and fix few bugs. For more details see change list below.

    As of this release, V8 >= 6.0.45 required.

      • BC-breaking or potentially BC-breaking changes

    Changes to public API and other important changes which may affect end-user:

    - Raise libv8 required version to 6.0.45;
    - Add V8Value::InstanceOf() method;
    - Add V8ObjectValue::SetNativeDataProperty() method;
    - Add V8PropertyFilter, V8KeyCollectionMode and V8IndexFilter enums;
    - Add property filtering support to V8ObjectValue::Get{Property,OwnProperty}Names();
    - Consistently expose all well-known symbols on V8SymbolValue;
    - Setting boolean props on StackFrame with valid type;
    - Remove non-working and non-supporting $attributes argument from V8StringValue constructor in stubs;
    - * Add V8ConstructorBehavior and support for it in V8FunctionTemplate constructor;
    - * Add signature support in V8FunctionTemplate constructor via $receiver;
    - * Add signature support to Template:SetNativeDataProperty() and ObjectTemplate::SetAccessor() via $receiver;
    - * Remove require $isolate parameter from V8Value::TypeOf();
    - * Remove deprecated V8Context::EstimatedSize() method;
    - * Remove deprecated V8StackTraceStackTraceOptions;
    - * Remove deprecated V8StackTrace::AsArray();
    - * Require Context explicitly in V8Isolate::ThrowException();
    - * Rename V8ExceptionsGenericException to V8ExceptionsException;
    - * Rename V8ExceptionsAbstractResourceLimitException to V8ExceptionsResourceLimitException;
    - internal: Check whether returned context is empty in V8IsolateGetEnteredContext() instead of checking InContext();
    

Source: http://www.phpdeveloper.org/news/25133

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Gundars Meness: Unit Testing – The Big Picture

Gundars Meness: Unit Testing – The Big Picture

If you’re still new to the world of testing in your applications, you should give this new guide from Gundars Meness a read. He’s done a great job of providing "the big picture" of testing – why to do it and what it is.

This is not a crash course of what characters one needs to type in his code editor to produce unit tests. This is fuel the brain requires before attempting such actions.

The subject of Unit Testing is not as simple as one might think. Many of us, developers, go into unit testing based on pressure from clients, peers, colleagues, our heroes and so on. We quickly learn the value of it, and, once the tech setup is done, there is a tendency to forget the big picture, if it was ever learnt. This article will provide a short insight into what is and isn’t unit testing in PHP and in general, and unit test place in the quality assurance realm.

He then breaks up the article into a few different sections, each with a paragraph or two, covering different testing related topics:

  • What is testing?
  • What really is testing?
  • What is Unit Testing?
  • How to write a Unit test?

There’s some great suggestions in here, for both those new to testing and those still trying to figure out some good practices.

Source: http://www.phpdeveloper.org/news/25132

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Gundars Meness: Unit Testing – The Big Picture

Gundars Meness: Unit Testing – The Big Picture

If you’re still new to the world of testing in your applications, you should give this new guide from Gundars Meness a read. He’s done a great job of providing "the big picture" of testing – why to do it and what it is.

This is not a crash course of what characters one needs to type in his code editor to produce unit tests. This is fuel the brain requires before attempting such actions.

The subject of Unit Testing is not as simple as one might think. Many of us, developers, go into unit testing based on pressure from clients, peers, colleagues, our heroes and so on. We quickly learn the value of it, and, once the tech setup is done, there is a tendency to forget the big picture, if it was ever learnt. This article will provide a short insight into what is and isn’t unit testing in PHP and in general, and unit test place in the quality assurance realm.

He then breaks up the article into a few different sections, each with a paragraph or two, covering different testing related topics:

  • What is testing?
  • What really is testing?
  • What is Unit Testing?
  • How to write a Unit test?

There’s some great suggestions in here, for both those new to testing and those still trying to figure out some good practices.

Source: http://www.phpdeveloper.org/news/25132

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Freek van der Herten: Dropbox will turn off v1 of their API soon. It’s time to update your PHP appli

Freek van der Herten: Dropbox will turn off v1 of their API soon. It’s time to update your PHP appli

Freek van der Herten has a new post with both a reminder and a solution to an upcoming change from the Dropbox service: the disabling of their v1 API (and a PHP package you can use to be prepared).

Last year on 28th of June Dropbox deprecated v1 of their API. On the same date this year they will turn off all v1 endpoints. If you’re using using Flysystem, Laravel or the official PHP SDK to work with Dropbox, it’s the time to update.

Last week my company released a Dropbox API client and a Flysystem Dropbox adapter that both use v2 of the dropbox API. In this blogpost I’d like to explain how to install and use these packages.

He then shows you how to update your Flysystem adapters to use this new adapter for Dropbox – basically a simple code change once the package is installed. He then moves on to updating a Laravel application, configuring it’s built-in file abstraction with the new adapter via a DropboxServiceProvider. The post ends with a bit talking about the update of other types of PHP applications (not using Flysystem) that could make use of other packages to make the required updates.

Source: http://www.phpdeveloper.org/news/25131

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Freek van der Herten: Dropbox will turn off v1 of their API soon. It’s time to update your PHP appli

Freek van der Herten: Dropbox will turn off v1 of their API soon. It’s time to update your PHP appli

Freek van der Herten has a new post with both a reminder and a solution to an upcoming change from the Dropbox service: the disabling of their v1 API (and a PHP package you can use to be prepared).

Last year on 28th of June Dropbox deprecated v1 of their API. On the same date this year they will turn off all v1 endpoints. If you’re using using Flysystem, Laravel or the official PHP SDK to work with Dropbox, it’s the time to update.

Last week my company released a Dropbox API client and a Flysystem Dropbox adapter that both use v2 of the dropbox API. In this blogpost I’d like to explain how to install and use these packages.

He then shows you how to update your Flysystem adapters to use this new adapter for Dropbox – basically a simple code change once the package is installed. He then moves on to updating a Laravel application, configuring it’s built-in file abstraction with the new adapter via a DropboxServiceProvider. The post ends with a bit talking about the update of other types of PHP applications (not using Flysystem) that could make use of other packages to make the required updates.

Source: http://www.phpdeveloper.org/news/25131

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Freek van der Herten: Dropbox will turn off v1 of their API soon. It’s time to update your PHP appli

Freek van der Herten: Dropbox will turn off v1 of their API soon. It’s time to update your PHP appli

Freek van der Herten has a new post with both a reminder and a solution to an upcoming change from the Dropbox service: the disabling of their v1 API (and a PHP package you can use to be prepared).

Last year on 28th of June Dropbox deprecated v1 of their API. On the same date this year they will turn off all v1 endpoints. If you’re using using Flysystem, Laravel or the official PHP SDK to work with Dropbox, it’s the time to update.

Last week my company released a Dropbox API client and a Flysystem Dropbox adapter that both use v2 of the dropbox API. In this blogpost I’d like to explain how to install and use these packages.

He then shows you how to update your Flysystem adapters to use this new adapter for Dropbox – basically a simple code change once the package is installed. He then moves on to updating a Laravel application, configuring it’s built-in file abstraction with the new adapter via a DropboxServiceProvider. The post ends with a bit talking about the update of other types of PHP applications (not using Flysystem) that could make use of other packages to make the required updates.

Source: http://www.phpdeveloper.org/news/25131

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Amazon Web Services: PHP application logging with Amazon CloudWatch Logs and Monolog

Amazon Web Services: PHP application logging with Amazon CloudWatch Logs and Monolog

On the Amazon Web Services blog there’s a new post showing you how to use the Monolog logging library and a custom AWS extension to ship your logs to Amazon CloudWatch quickly and easily.

Logging and information debugging can be approached from a multitude of different angles. Whether you use an application framework or coding from scratch it’s always comforting to have familiar components and tools across different projects. In our examples today, I am going to enable Amazon CloudWatch Logs logging with a PHP application. To accomplish this, I wanted to use an existing solution that is both already popular and well used, and that is standards compliant. For these reasons, we are going to use the open source log library, PHP Monolog (https://github.com/Seldaek/monolog).

They start by introducing the Monolog library for those not familiar with it and how it relates to the PSR-3 standard. The ultimate goal with their implementation is to allow for the logs to be shipped to CloudWatch and implement some alerting around them. The tutorial then kicks in and they show you how to use Composer to install Monolog and an add-on to interface with CloudWatch. Code is provided to set up the initial logger and how to have it to log messages to different places. They then move over to CloudWatch and define a filter for the JSON data to find successful logins to your application. They also show how to use this same functionality in a Laravel application, contained in a test route.

Source: http://www.phpdeveloper.org/news/25130

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Stefan Koopmanschap: To Exception or not to Exception

Stefan Koopmanschap: To Exception or not to Exception

In the latest post to his site Stefan Koopmanschap offers some advice on when to use exceptions and when to avoid them (the result of a recent Twitter discussion).

I recently found myself in a discussion on whether or not exceptions could be used to control program flow in software (specifically in PHP applications). That triggered me to post a tweet:

Exceptions should not be used to control expected application flow. Discuss…. @skoop

This triggered quite a bit of discussion, which gave me a lot of input on this topic. I want to thank everyone who joined that discussion for their input, which was really valuable. In this blogpost I’ll do a summary of the different arguments in the discussion, and give my opinion on this.

He goes on to define the term "program flow" and how that relates to the idea of using exceptions to control it. He then talks about naming things, the "intent" of your code and how the right names can make your code clearer and easier to maintain.

Source: http://www.phpdeveloper.org/news/25129

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>