フィードアグリゲーター

PHP – Code Wall: How To Log Like A Pro With Laravel & LogViewer

phpdeveloper.org - 2019-09-04(水) 05:00:01

Laravel ships with a logging system that is easily utilized, these logs end up .txt log files within your project. Whilst in the text files, they are pretty useless and boring, but if you add a lovely little plugin named LogViewer, things become pretty awesome. LogView works with Laravel 5.0 all the...

カテゴリー: php

Laravel News: Laravel 6 Is Now Released

phpdeveloper.org - 2019-09-04(水) 02:30:02
The Laravel team is proud to announce the release of Laravel 6 and it’s now available to everyone. The post Laravel 6 Is Now Released appeared first on Laravel News. Join the Laravel Newsletter to get Laravel articles like th...
カテゴリー: php

Looking For A New Adventure

planet PHP - 2019-09-04(水) 01:30:00

Fourteen years ago, almost to the day, I received a job offer from Zend to join their nascent eBiz team, where I started contributing almost immediately to the yet-to-be-announced Zend Framework. Two years later, I joined the Zend Framework team full-time. A year later, I was promoted to Architect. A year after that, I was promoted to Project Lead of Zend Framework, a role I kept for the next ten years. Over the years, Zend was acquired by RogueWave Software, which was in turn acquired by Perforce earlier this year.

Two months ago, almost to the day, was my last day with Zend/RogueWave/Perforce.

I'm now looking for a new adventure.

But first, a word about Laminas

As some of you might recall, in April, I blogged about transitioning Zend Framework to the Linux Foundation, as the new "Laminas Project".

This is still a work in progress, and I'm still dedicated to finalizing the transition. While we are well under-way technically, we're still identifying our initial corporate members. Regardless, we plan to launch the technical project soon, and will likely do a small, targeted fundraising effort to allow us to do some marketing projects and conference/speaker sponsorships while we finalize our long-term funding goals.

It's simply taking longer than we anticipated.

In the interim, I am still acting as project lead for the Laminas Project, including Apigility and Expressive, and working actively towards the project's organizational and funding goals.

And now this

Could your business benefit from somebody who has been in a leadership position of a large, enterprise, Open Source framework with hundreds of millions of downloads?

Do you need an expert PHP developer and application architect?

Do you need somebody to guide and implement your organization's API strategy?

Do you need somebody who can help you extract, maintain, and publish discrete library packages for your applications?

Do you need a competent and professional communicator for your development team?

Do you need somebody who can help you with your unit testing and continuous integration?

Do you need somebody who can implement git workflows, and help your team adopt them?

Do you need somebody to mentor your developers, teaching them about standards, object oriented programming, unit testing, and best practices?

These are all skills I can bring to the table.

What are my needs in a new position?

I work remotely. My entire tenure with Zend was done remotely, and I thrive best when I can manage my own time, including when and how interruptions occur. Additionally, I still have a child in the public school system, and uprooting them from their peers and support system is something I'd prefer to avoid. I will consider relocating, but only for exceptional teams and locations.

I would love for a company to hire me to continue working on Laminas as my primary duties. The project needs people with dedicated time to review issues and feature requests, create releases, write documentation, and answer questions from users.

One dream I've had for some time is to work for a company with a social mission, as I'd like to use my skills to make the world a better place.

If you or your company feel like I'd be a good fit for your organization, I invite you to contact me via my contact page!

Or become a Patron

I have also launched a Patreon, to cover some of my time and expenses while I work towards the Laminas launch and finalizing its funding. If you find this valuable, become a Patron today!

Looking For A New Adventure was originally published 3 September 2019 on https://mwop.net by .

カテゴリー: php

Voices of the ElePHPant: Interview with Roy Sivan

phpdeveloper.org - 2019-09-04(水) 00:00:02
@royboy789

Show Notes Roy Sivan's web site

Audio

This episode is sponsored by Using the WordPress REST API

The post Interview with Roy Sivan appeared first on Voices of the ElePHPant.

カテゴリー: php

Martin Hujer blog: How to use Data Providers in PHPUnit

phpdeveloper.org - 2019-09-03(火) 23:00:02

I think that even if you are already using Data Providers, you will find some of those tips useful.

Data Providers are a handy feature of PHPUnit which allows you to run the same test with different inputs and expected results. This is useful when you are writing some text filtering, transf...

カテゴリー: php

Pavel Stehule: pspg supports sort by selected column

planet postgresql - 2019-09-03(火) 22:48:00
Master branch of pspg supports sort by column selected by vertical cursor.

Why I wrote this feature? You can try to list of tables in psql by \dt+ command. The result is sorted by schema and by name. Sometimes can be interesting to see result ordered by table's sizes. Now it is easy. Press Alt-v to show vertical cursor. Later move to right to "Size" column. Then press d as descendent sort. You can get resuly like attached screenshot:



The sort is working only on numeric columns (but units used by psql are supported)
カテゴリー: postgresql

Interview with Roy Sivan

planet PHP - 2019-09-03(火) 20:30:00

@royboy789 Show Notes Audio This episode is sponsored by
Using the WordPress REST API

The post Interview with Roy Sivan appeared first on Voices of the ElePHPant.

カテゴリー: php

Jonathan Katz: Just Upgrade: How PostgreSQL 12 Can Improve Your Performance

planet postgresql - 2019-09-03(火) 07:56:00

PostgreSQL 12, the latest version of the "world's most advanced open source relational database," is being released in the next few weeks, barring any setbacks. This follows the project's cadence of providing a raft of new database features once a year, which is quite frankly, amazing and one of the reasons why I wanted to be involved in the PostgreSQL community.

In my opinion, and this is a departure from previous years, PostgreSQL 12 does not contain one or two single features that everyone can point to and say that "this is the 'FEATURE' release," (partitioning and query parallelism are recent examples that spring to mind). I've half-joked that the theme of this release should be "PostgreSQL 12: Now More Stable" -- which of course is not a bad thing when you are managing mission critical data for your business.

And yet, I believe this release is a lot more than that: many of the features and enhancements in PostgreSQL 12 will just make your applications run better without doing any work other than upgrading!

(...and maybe rebuild your indexes, which, thanks to this release, is not as painful as it used to be)!

It can be quite nice to upgrade PostgreSQL and see noticeable improvements without having to do anything other than the upgrade itself. A few years back when I was analyzing an upgrade of PostgreSQL 9.4 to PostgreSQL 10, I measured that my underlying application was performing much more quickly: it took advantage of the query parallelism improvements introduced in PostgreSQL 10. Getting these improvements took almost no effort on my part (in this case, I set the max_parallel_workers config parameter).

Having applications work better by simply upgrading is a delightful experience for users, and it's important that we keep our existing users happy as more and more people adopt PostgreSQL.

So, how can PostgreSQL 12 make your applications better just by upgrading? Read on!

カテゴリー: postgresql

Andreas 'ads' Scherbaum: PGConf.EU 2019 - Table space for Open Source Projects

planet postgresql - 2019-09-02(月) 07:30:00

The PostgreSQL Conference Europe team will allow all PostgreSQL related Open Source projects to place flyers or stickers on the PGEU table during the conference.

The following conditions apply:

  • The material must be about a PostgreSQL related project
  • No company sponsoring or endorsement is allowed on the material (this includes the backside, small print, and also includes any advertisement for the printing company)

We reserve the right to remove or return any material which we deem not suitable for the conference. Please talk to our staff before placing material on the table.

We expect around 550 visitors this year, but people might grab more material or stickers for friends or colleagues.

カテゴリー: postgresql

Kaarel Moppel: Updates for the Postgres Showcase project

planet postgresql - 2019-09-01(日) 16:00:13

In order to prepare for the start of training season (you can see our “stock” training offerings here by the way), I’ve updated our small “Postgres features showcase” project, and thought I’d echo it out too. Main changes – coverage on some features of the current v11 release and also from the upcoming v12.

Short project background

The project was introduced some two years ago – the main idea of the project itself is to provide a compact and “hands-on” set of commented samples to help newcomers get up to speed with Postgres. Of course, one cannot beat official documentation but sadly, the documentation for Postgres doesn’t have a dedicated folder for working code samples. However, the tutorial can be helpful. So, the idea is to provide some commented SQL for the “code-minded” people to quickly see and “feel” the concepts to get the gist of it faster.

Updated list of topics covered
  • Connecting
  • Creating databases / roles
  • Transaction management
  • Creating / altering tables
  • Partitioning and other table modifiers
  • Most common data types
  • Constraints
  • Views / materialized views
  • Stored functions / procedures
  • Triggers
  • Enums / custom types
  • Extensions
  • Row-level security
  • Analytical and parallel queries
  • Indexing
  • String processing and arrays
RFC

If you see that this project is somewhat useful but could be improved even more, we would be very glad if you take the time to provide your ideas as Github issues – or even better – directly as Pull Requests. Thanks!

The post Updates for the Postgres Showcase project appeared first on Cybertec.

カテゴリー: postgresql

Pavel Stehule: new release 1.7.0 of pspg

planet postgresql - 2019-09-01(日) 05:20:00
I released new version of pspg. Now, colum searching and vertical cursor is supported.
カテゴリー: postgresql

Bruce Momjian: Release of pgcryptokey

planet postgresql - 2019-09-01(日) 03:30:01

Nine months ago, I started development of a key management extension for pgcrypto. The tool is called pgcryptokey and is now ready for beta testing.

It uses two-levels of encryption, with an access password required to use the cryptographic keys. It supports setting and changing the access password, multiple cryptographic keys, key rotation, data reencryption, and key destruction. It also passes the access password from client to server without it appearing in clear text in SQL queries, and supports boot-time setting. The extension leverages pgcrypto and Postgres custom server variables.

カテゴリー: postgresql

Pavel Stehule: Why you need plpgsql_check (if you write procedures in PLpgSQL)

planet postgresql - 2019-08-31(土) 05:04:00
PLpgSQL is simple (but relatively power) specialized language. It is specialized for usage inside PostgreSQL as glue of SQL statements. It is great language for this purpose (and can be bad if it is used differently - for high cycles numeric calculation for example).

Originally a implementation of PLpgSQL language was really simple - it was very simple language with possibility to execute embedded SQL. But there was not possibility to check syntax of this SQL in validation time.

Note: PLpgSQL is a interpret of AST (abstract syntax tree) nodes. There is a validation stage (when code is parsed into AST), and evaluation stage (runtime), when AST (parsed again when code is first executed) is interpreted.

Old SPI (Stored Procedure Interface) had not any API for validation of SQL without execution. Almost all checks in this time was at runtime. It was not too practical - so some checks (check of SQL syntax) are at validation stage now. Still PLpgSQL validator doesn't check a validity of SQL identifiers (tables, columns, functions, ... names). Now, there are two reason why the validator doesn't do it: a) we have not any other tools how to solve cyclic dependencies, b) Postgres's local temp tables - PostgreSQL temporary tables are created at runtime and doesn't exists at validation time - so PLpgSQL validator should not to check validity of SQL identifiers - they should not to exists in this time.

SQL identifiers validity checks
But often we should to check all identifiers inside code (SQL identifiers too). This is time for plpgsql_check:

CREATE TABLE bigtable(id int, v int);
INSERT INTO bigtable
SELECT random() * 1000000, random()*10000
FROM generate_series(1,1000000);
CREATE INDEX ON bigtable(id);
VACUUM ANALYZE bigtable;

CREATE OR REPLACE FUNCTION example01(_id numeric)
RETURNS numeric AS $$
DECLARE
r record;
s numeric DEFAULT 0;
BEGIN
FOR r IN SELECT * FROM bigtable WHERE id = _id
LOOP
s := s + r.k;
END LOOP;
END;
$$ LANGUAGE plpgsql;

This code has lot of issues, but no one is a problem for buildin plpg[...]
カテゴリー: postgresql

508 Loop Detected

planet PHP - 2019-08-31(土) 03:30:00

508 Loop Detected is a status code that’s introduced by an extension of the WebDAV specification.

The specific extension adds support for a ‘Binding’ feature. WebDAV itself is a bit like a filesystem protocol over HTTP, and the Binding extension adds support for a ‘hardlink’-like feature via the BIND and UNBIND methods.

WebDAV has a few features that allows a client to get information from a server and ask for an entire directory tree. The binding extension makes it possible to make a link from 1 resource, and create the target somewhere in it’s own tree.

This makes it hypothetically possible to create a directory structure that’s ‘infinitely deep’, because it always keeps looping back into itself.

When this happens, a server can respond with 508 Loop Detected to tell a client it’s not possible to return a result of infinite size.

It’s extremely rate to run into it, as there’s few WebDAV servers that implement support for it.

HTTP/1.1 508 Loop Detected Content-Type: text/plain There was a loop detected in the directory tree, which means that we're not able to return a full directory tree. Should I use this?

Maybe. Even though this is a WebDAV feature, other types of APIs might have support for a feature that allows recursively linking structures. If such an API also has a feature to flatten and return entire trees, this status code could be appropriate and doesn’t hurt.

Although, the choice of the 5xx status code is a little odd. If a system allows recurively linking structures, and the user requested this, it’s really the client that’s at fault.

References
カテゴリー: php

Johann Oskarsson: PostgreSQL: Retroactively Adding Binary I/O to a Type

planet postgresql - 2019-08-31(土) 01:00:49

Here we go through the motions af adding binary input/output functions to an already existing type. We start by introducing a program that tests binary I/O for the given types, then show how to implement the binary I/O in C and finally how to fix the PostgreSQL catalog tables for the new functionality. We also include the changes in the installation script for normal installation of the new version.

Table of Contents

Testing Binary I/O

Adding the Binary I/O Functions

Fixing the Hashtypes Extension

Github

Acknowledgements

Downloads

Support

Testing Binary I/O

Here we present a program that performs binary input/output with the various SHA data types in the hashtypesextension. See the download section later.

The Readme

Test the various binary I/O routines of the SHA data types.

Prerequisites: the hashtypes extension has been created on a given database, like so

create extension hashtypes;

with version 0.1.6 or later.

This program performs a simple binary I/O test of the various SHA types, from SHA1 to SHA512.

The usage is very simple,

shabin "connection string"

example,

shabin "host=localhost port=5432 dbname=foo user=bar"

and it will connect to the database with the given string, and attempt to make query of the form

select digest1, digest224, digest256, digest384, digest512;

where each of the digests are of the same SHA type. It does this by querying the SHA type oids first, and then uses them to feed each digest to the PostgreSQL server.

If there is an error, the program will print a message to standard error and returns one to the operating system. On a successful run, the program prints a success message and returns zero to the operating system.

The Shabin Program

Test the various binary I/O routines of the SHA data types.

PostgreSQL header.

#include

System dependent networking headers, for ntohl().

#ifdef _WIN32 #include #else #include #endif

Sta

[...]
カテゴリー: postgresql

PHP 7.1.32 Released

php.net - 2019-08-30(金) 15:42:02
カテゴリー: php

PHP 7.1.32 Released

planet PHP - 2019-08-30(金) 09:00:00
The PHP development team announces the immediate availability of PHP 7.1.32. This is a security release.All PHP 7.1 users are encouraged to upgrade to this version.For source downloads of PHP 7.1.32 please visit our downloads page, Windows source and binaries can be found on windows.php.net/download/. The list of changes is recorded in the ChangeLog.
カテゴリー: php

Luca Ferrari: Compute day working hours in PL/pgsql

planet postgresql - 2019-08-30(金) 09:00:00

How many working hours are there in a range of dates?

Compute day working hours in PL/pgsql

A few days ago there was a very nice thread in the pgsql-general mailing list asking for ideas about how to compute working hours in a month.
The idea is quite simple: you must extract the number of working days (let’s say excluding sundays) and multiple each of them for the number of hours per day and then get the sum.
There are a lot of nice and almost one-liner solutions in the thread, so I strongly encourage you to read it all!

I came up with my own solution, that is based on functions, and here I’m going to explain it hoping it can be useful (at least as a starting point).

You can find the code, as usual, on my GitHub repository related to PostgreSQL.

The workhorse function

One reason I decided to implement the alghoritm using a function was because I want it to be configurable. There are people, like me, that do a job where the working hours are different on a day-by-day basis. So, assuming the more general problem of computing the working hours between two dates, here there’s a possible implementation:

CREATE OR REPLACE FUNCTION compute_working_hours( begin_day DATE, end_day DATE, _saturday boolean DEFAULT false, _hour_template real[] DEFAULT ARRAY[ 8, 8, 8, 8, 8, 8, 8 ]::real[], _exclude_days date[] DEFAULT NULL )...
カテゴリー: postgresql

Luca Ferrari: PgBouncer gets SCRAM!

planet postgresql - 2019-08-30(金) 09:00:00

A few of days ago a new release of PgBouncer has been released, with the addition of SCRAM support!

PgBouncer gets SCRAM!

Three days ago PgBouncer 1.11 has been released, and one feature that immediately caught my attention was the addition of /SCRAM support for password/.

SCRAM is currently the most secure way to use password for PostgreSQL authentication and has been around since version ~10~ (so nearly two years). SCRAM support for PgBouncer has been a /wanted feature/ for a while, since not having it prevented users of this great tool to use SCRAM on the clusters.

Luckily, now this has been implemented and [the configuration of the PgBouncer account](https://pgbouncer.github.io/config.html#authentication-file-format** is similar to the plain and ~md5~, so it is very simple.

I really love PgBouncer and, with this addition, I can now upgrade my servers to /SCRAM/! Thank you PgBouncer developers!

カテゴリー: postgresql

PHP: Hypertext Preprocessor: PHP 7.3.9 Release Announcement

phpdeveloper.org - 2019-08-30(金) 06:30:02

The PHP development team announces the immediate availability of PHP 7.3.9. This is a security release which also contains several bug fixes.All PHP 7.3 users are encouraged to upgrade to this version.For source downloads of PHP 7.3.9 please visit our downloads page, Windows source and binaries can ...

カテゴリー: php

ページ