Skip to content

Instantly share code, notes, and snippets.

View lisachenko's full-sized avatar
🚀
Vibe-coding PHP extensions in PHP

Alexander Lisachenko lisachenko

🚀
Vibe-coding PHP extensions in PHP
View GitHub Profile
@lisachenko
lisachenko / instantinators.php
Created August 1, 2018 08:11
Private class instantinators
<?php
/**
* Sealed class can not be created directly
*/
class Seal
{
private function __construct()
{
// private ctor prevents from direct creation of instance
}
@lisachenko
lisachenko / fix_ace.sql
Created January 29, 2019 14:55
Symfony ACL reorder ACE
DELIMITER ;;
DROP PROCEDURE IF EXISTS fix_ace_order;
CREATE PROCEDURE fix_ace_order()
BEGIN
DECLARE done INT DEFAULT FALSE;
DECLARE acl_id INT;
DECLARE acl_cursor CURSOR FOR SELECT o.id
FROM acl_object_identities o
LEFT JOIN acl_entries e ON (
e.class_id = o.class_id AND