{"id":19218755,"url":"https://github.com/fadilxcoder/packagist","last_synced_at":"2025-02-23T09:14:51.412Z","repository":{"id":40296906,"uuid":"271869322","full_name":"fadilxcoder/packagist","owner":"fadilxcoder","description":"Packagist - Testing multiple packages codebase","archived":false,"fork":false,"pushed_at":"2023-02-15T17:40:33.000Z","size":448,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-04T19:23:43.313Z","etag":null,"topics":["notes","packagist","php","poc"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fadilxcoder.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-12T18:53:11.000Z","updated_at":"2023-02-07T19:31:15.000Z","dependencies_parsed_at":"2024-11-09T14:31:36.346Z","dependency_job_id":"05c04fe7-e115-43af-b9ed-4e4a624a7433","html_url":"https://github.com/fadilxcoder/packagist","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fadilxcoder%2Fpackagist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fadilxcoder%2Fpackagist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fadilxcoder%2Fpackagist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fadilxcoder%2Fpackagist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fadilxcoder","download_url":"https://codeload.github.com/fadilxcoder/packagist/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240292395,"owners_count":19778311,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["notes","packagist","php","poc"],"created_at":"2024-11-09T14:27:58.972Z","updated_at":"2025-02-23T09:14:51.370Z","avatar_url":"https://github.com/fadilxcoder.png","language":"PHP","readme":"# Resources\n\n- https://getcomposer.org/doc/articles/scripts.md#command-events  - Composer Command Events\n\n```\n\"scripts\": {\n        \"post-install-cmd\": \"execute a command here\", # occurs after the install command has been executed with a lock file present.\n        \"post-update-cmd\": \"cghooks update\", # occurs after the update command has been executed, or after the install command has been executed without a lock file present.\n        ...\n    },\n```   \n\n- https://packagist.org/packages/tracy/tracy - Debugger\n\n- https://packagist.org/packages/fzaninotto/faker - Fake data generator\n\n- https://packagist.org/packages/brainmaestro/composer-git-hooks - Git hooks in your composer config\n- - https://git-scm.com/docs/githooks\n- - Run `composer update` to update hooks if modify\n\n- https://packagist.org/packages/dompdf/dompdf - DOM pdf\n\n- https://packagist.org/packages/nategood/httpful - PHP HTTP Client\n\n- https://packagist.org/packages/squizlabs/php_codesniffer - CodeSniffer\n- - https://github.com/squizlabs/PHP_CodeSniffer/wiki/Reporting - Reporting\n- - http://manpages.ubuntu.com/manpages/bionic/man1/phpcs.1.html - Manual\n- - Use `dos2unix \u003cfile_name\u003e` : Convert DOS file to UNIX format\n- - Run `vendor/bin/phpcs \u003cfile_name\u003e` and get errors\n- - E.g `phpcs --report=code $(ls *.php) \u003e file.txt`\n\n- `composer require league/fractal` - (https://fractal.thephpleague.com/)\n- \u003cURL\u003e/fractal.php\n\n- https://craig.is/writing/chrome-logger (Debugging server side applications in the Chrome console.)\n- https://github.com/ccampbell/chromephp (Chrome)\n- Activate **Chrome Logger** in chrome web browser to see debugging codes in console.\n \n# Set Up - docker version\n\n- Clone docker branch (Dockerize the environment)\n- GOTO `src`\n- Clone master branch (Source Code)\n\n# Notes\n\n- `image-file.php` - never execute in browser, used as a template and rendered dynamically in `index.php`\n- PHPCS\n- - Exec in terminal `./phpcs/bin.sh`\n- - Create `phpcs/report.txt` -\u003e `phpcs/index.html` (HTML report)\n- Git Hooks in `composer.json` on commit changes\n\n#  Script to combine HTML/CSS into inline styles\n\n- https://packagist.org/packages/tijsverkoyen/css-to-inline-styles\n- Install `composer require tijsverkoyen/css-to-inline-styles`\n- HTML page\n```\n\u003chtml\u003e\n\u003chead\u003e\n    \u003cmeta charset=\"utf-8\"\u003e\n    \u003ctitle\u003eFX\u003c/title\u003e\n    \u003clink rel=\"icon\" href=\"https://phpsandbox.io/assets/img/brand/phpsandbox.png\"\u003e\n    \u003clink href=\"https://fonts.googleapis.com/css2?family=Jost:ital,wght@0,400;0,500;0,531;0,600;0,700;0,800;0,900;1,400;1,500;1,531;1,600;1,700;1,800;1,900\u0026amp;display=swap\" rel=\"stylesheet\"\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n\u003cdiv class=\"h-screen bg-white flex items-center justify-center font-sans text-gray-700\" style=\"font-family: 'Jost', sans-serif\"\u003e\n    \u003cdiv class=\"font-medium items-center text-center flex flex-col justify-center h-full\"\u003e\n        \u003cdiv class=\"flex flex-col justify-center items-center\"\u003e\n            \u003cimg src=\"https://res.cloudinary.com/xeviant/image/upload/v1609780512/phpsandbox/v3_assets/PSB_LOGO_TEXT_HOR.png\" alt=\"PSB Logo + Text\" class=\"h-32\"\u003e\n\n            \u003ch1 style=\"font-size: 2rem;\" class=\"text-gray-700\"\u003efadilxcoder 🎉\u003c/h1\u003e\n\n            \u003cp class=\"mb-6 font-semibold\"\u003eDesign, Develop, Deploy !\u003c/p\u003e\n\n            \u003cdiv class=\"p-2 bg-indigo-800 text-white rounded\"\u003efadil@xcoder.dvlpr\u003c/div\u003e\n        \u003c/div\u003e\n    \u003c/div\u003e\n\u003c/div\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\n- PHP script\n```\nrequire 'vendor/autoload.php';\n\nuse TijsVerkoyen\\CssToInlineStyles\\CssToInlineStyles;\n\n// create instance\n$cssToInlineStyles = new CssToInlineStyles();\n\n$html = file_get_contents(__DIR__ . '/html-page.html');\n$css = file_get_contents(\"https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css\");\n\n// output\n\necho $cssToInlineStyles-\u003econvert(\n    $html,\n    $css\n);\n\n```\n\n# Git hook\n\n `.git\\hooks\\pre-commit`\n\n```bash\n#!/bin/bash\n\necho committing as $(git config user.name)\n#./vendor/bin/phpcs --report=code $(ls *.php) \u003e ./phpcs/report.txt\n#./phpcs/bin.sh\n\n```\n\n# Selenium - Automated testing\n\n- Download driver : https://chromedriver.chromium.org/downloads (*Chrome version 110*)\n- Launch chrome driver : `./chromedriver.exe --port=4444`\n- GIT repo : https://github.com/php-webdriver/php-webdriver\n- Download JAR : https://www.selenium.dev/downloads/ (*Latest stable version 4.8.0*)\n- CLI : `java -jar selenium-server-4.8.0.jar`\n- GOTO : http://localhost/packagist/selenium\n\n# Addons.\n\u003chr\u003e\n\u003cimg src=\"./_docs/php-8-new-string-functions.jpg\" alt=\"php-8-new-string-functions.jpg\"\u003e\n\u003chr\u003e\n\u003cimg src=\"./_docs/proxy.jpg\" alt=\"proxy.jpg\"\u003e","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffadilxcoder%2Fpackagist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffadilxcoder%2Fpackagist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffadilxcoder%2Fpackagist/lists"}