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 Luty, 2017

Community News: Exakat – Static analysis tools for PHP

Community News: Exakat – Static analysis tools for PHP

On the Exakat GitHub account Damien Seguy has put together a pretty complete list of static analyzers you can use for your PHP applications.

The list is broken down into the types of scanners:

  • Bugs finders
  • Coding standards
  • DIY
  • Fixers
  • Metrics
  • SaaS
  • Misc

Each section includes a good list of tools and links to each of them (usually just to other GitHub repositories but some go to actual project pages). There’s a lot of them to look through but be careful to evaluate the current state of the project. Just because it’s linked here doesn’t mean it’s a complete tool.

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

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

Community News: Exakat – Static analysis tools for PHP

Community News: Exakat – Static analysis tools for PHP

On the Exakat GitHub account Damien Seguy has put together a pretty complete list of static analyzers you can use for your PHP applications.

The list is broken down into the types of scanners:

  • Bugs finders
  • Coding standards
  • DIY
  • Fixers
  • Metrics
  • SaaS
  • Misc

Each section includes a good list of tools and links to each of them (usually just to other GitHub repositories but some go to actual project pages). There’s a lot of them to look through but be careful to evaluate the current state of the project. Just because it’s linked here doesn’t mean it’s a complete tool.

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

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

Matthias Noback: Duck-typing in PHP

Matthias Noback: Duck-typing in PHP

In this new post to his site Matthias Noback talks about a topic not normally discussed outside of languages that support it natively – duck typing.

For quite some time now the PHP community has becoming more and more professional. “More professional” in part means that we use more types in our PHP code. Though it took years to introduce more or less decent types in the programming language itself, it took some more time to really appreciate the fact that by adding parameter and return types to our code, we can verify its correctness in better ways than we could before. And although all the type checks still happen at runtime, it feels as if those type checks already happen at compile time, because our editor validates most of our code before actually running it.

[...] think that nowadays many PHP developers agree that silent type conversions is not something which is very useful, nor safe. But sometimes it’s good to remember what’s possible with PHP, due to it being a dynamic scripting language.

He goes on to give an example of the flexibility of PHP and how the most basic functionality usually provides the most "loose" level of abilities. He talks about type enforcement, limiting interfaces and the things PHP does natively to help keep it simpler instead. He then introduces the duck-typing-library package and what it offers to help you run validation against values to ensure they’re correctness and type.

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

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

Matthias Noback: Duck-typing in PHP

Matthias Noback: Duck-typing in PHP

In this new post to his site Matthias Noback talks about a topic not normally discussed outside of languages that support it natively – duck typing.

For quite some time now the PHP community has becoming more and more professional. “More professional” in part means that we use more types in our PHP code. Though it took years to introduce more or less decent types in the programming language itself, it took some more time to really appreciate the fact that by adding parameter and return types to our code, we can verify its correctness in better ways than we could before. And although all the type checks still happen at runtime, it feels as if those type checks already happen at compile time, because our editor validates most of our code before actually running it.

[...] think that nowadays many PHP developers agree that silent type conversions is not something which is very useful, nor safe. But sometimes it’s good to remember what’s possible with PHP, due to it being a dynamic scripting language.

He goes on to give an example of the flexibility of PHP and how the most basic functionality usually provides the most "loose" level of abilities. He talks about type enforcement, limiting interfaces and the things PHP does natively to help keep it simpler instead. He then introduces the duck-typing-library package and what it offers to help you run validation against values to ensure they’re correctness and type.

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

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

Matthias Noback: Duck-typing in PHP

Matthias Noback: Duck-typing in PHP

In this new post to his site Matthias Noback talks about a topic not normally discussed outside of languages that support it natively – duck typing.

For quite some time now the PHP community has becoming more and more professional. “More professional” in part means that we use more types in our PHP code. Though it took years to introduce more or less decent types in the programming language itself, it took some more time to really appreciate the fact that by adding parameter and return types to our code, we can verify its correctness in better ways than we could before. And although all the type checks still happen at runtime, it feels as if those type checks already happen at compile time, because our editor validates most of our code before actually running it.

[...] think that nowadays many PHP developers agree that silent type conversions is not something which is very useful, nor safe. But sometimes it’s good to remember what’s possible with PHP, due to it being a dynamic scripting language.

He goes on to give an example of the flexibility of PHP and how the most basic functionality usually provides the most "loose" level of abilities. He talks about type enforcement, limiting interfaces and the things PHP does natively to help keep it simpler instead. He then introduces the duck-typing-library package and what it offers to help you run validation against values to ensure they’re correctness and type.

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

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

Matthias Noback: Duck-typing in PHP

Matthias Noback: Duck-typing in PHP

In this new post to his site Matthias Noback talks about a topic not normally discussed outside of languages that support it natively – duck typing.

For quite some time now the PHP community has becoming more and more professional. “More professional” in part means that we use more types in our PHP code. Though it took years to introduce more or less decent types in the programming language itself, it took some more time to really appreciate the fact that by adding parameter and return types to our code, we can verify its correctness in better ways than we could before. And although all the type checks still happen at runtime, it feels as if those type checks already happen at compile time, because our editor validates most of our code before actually running it.

[...] think that nowadays many PHP developers agree that silent type conversions is not something which is very useful, nor safe. But sometimes it’s good to remember what’s possible with PHP, due to it being a dynamic scripting language.

He goes on to give an example of the flexibility of PHP and how the most basic functionality usually provides the most "loose" level of abilities. He talks about type enforcement, limiting interfaces and the things PHP does natively to help keep it simpler instead. He then introduces the duck-typing-library package and what it offers to help you run validation against values to ensure they’re correctness and type.

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

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

SitePoint PHP Blog: PHP Fractal – Make Your API’s JSON Pretty, Always!

SitePoint PHP Blog: PHP Fractal – Make Your API’s JSON Pretty, Always!

The SitePoint PHP blog has a tutorial posted by author Younes Rafie covering the use of the Fractal library from The PHP League to create "pretty" JSON API output.

If you’ve built an API before, I’ll bet you’re used to dumping data directly as a response. It may not be harmful if done right, but there are practical alternatives that can help solve this small problem.

One of the available solutions is Fractal. It allows us to create a new transformation layer for our models before returning them as a response. It’s very flexible and easy to integrate into any application or framework.

They use a Laravel application as the base, creating a simple database of user information and relating users to roles. The tutorial then starts in on using Fractal, building out "transformers" for the data. These transformers take in the data/object and, inside of a "transform" method, modify the output and return a "prettier" version. They show it in use in a controller, outputting a collection of user data, only returning the name and email values. The tutorial also covers a few other Fractal-related topics including pagination, including sub-resources and eager loading.

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

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

SitePoint PHP Blog: PHP Fractal – Make Your API’s JSON Pretty, Always!

SitePoint PHP Blog: PHP Fractal – Make Your API’s JSON Pretty, Always!

The SitePoint PHP blog has a tutorial posted by author Younes Rafie covering the use of the Fractal library from The PHP League to create "pretty" JSON API output.

If you’ve built an API before, I’ll bet you’re used to dumping data directly as a response. It may not be harmful if done right, but there are practical alternatives that can help solve this small problem.

One of the available solutions is Fractal. It allows us to create a new transformation layer for our models before returning them as a response. It’s very flexible and easy to integrate into any application or framework.

They use a Laravel application as the base, creating a simple database of user information and relating users to roles. The tutorial then starts in on using Fractal, building out "transformers" for the data. These transformers take in the data/object and, inside of a "transform" method, modify the output and return a "prettier" version. They show it in use in a controller, outputting a collection of user data, only returning the name and email values. The tutorial also covers a few other Fractal-related topics including pagination, including sub-resources and eager loading.

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

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

Full Stack Radio: 59: Jonathan Reinink – Form Hell Part 2: Complex Validation

Full Stack Radio: 59: Jonathan Reinink – Form Hell Part 2: Complex Validation

On the Full Stack Radio podcast host Adam Wathan is joined once again by Jonathan Reinink to follow up their previous show and talk more about complex validation.

In this episode, Adam and Jonathan continue their discussion about forms from episode 54, this time focusing on the complexities of validation.

Topics mentioned include form requests in Laravel, a forum post about a possible bypass of CVC and ZIP checks with Stripe and HTML5 form validation. You can listen to this latest show either through the in-page audio player or by downloading the mp3 directly. If you enjoy the episode, be sure to subscribe to their feed and follow them on Twitter for updates on when new shows are released.

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

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

Full Stack Radio: 59: Jonathan Reinink – Form Hell Part 2: Complex Validation

Full Stack Radio: 59: Jonathan Reinink – Form Hell Part 2: Complex Validation

On the Full Stack Radio podcast host Adam Wathan is joined once again by Jonathan Reinink to follow up their previous show and talk more about complex validation.

In this episode, Adam and Jonathan continue their discussion about forms from episode 54, this time focusing on the complexities of validation.

Topics mentioned include form requests in Laravel, a forum post about a possible bypass of CVC and ZIP checks with Stripe and HTML5 form validation. You can listen to this latest show either through the in-page audio player or by downloading the mp3 directly. If you enjoy the episode, be sure to subscribe to their feed and follow them on Twitter for updates on when new shows are released.

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

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