Skip to content

Instantly share code, notes, and snippets.

View MuhammadQuran17's full-sized avatar

Muhammad Umar MuhammadQuran17

  • DanAds
View GitHub Profile
@MuhammadQuran17
MuhammadQuran17 / Php_xmsi.md
Last active November 26, 2025 11:04
Code sheat

Update php in VPS

sudo apt install -y \
php8.3 \
php8.3-cli \
php8.3-common \
php8.3-mysql \
php8.3-xml \
@MuhammadQuran17
MuhammadQuran17 / git.md
Last active August 31, 2025 09:07
Git helper

Git clone private repository

  1. Create a grained PAT in github. Notice that grained PAT, can not see repos where you are not the owner, i.e. colloborator.
  2. Add Rules for your grained PAT. Permissions: Commit statuses, Contents, Pull requests and Metadata as Read to be able to Clone repositories. And the same Permissions need to the Read and Write to be able to push changes.
  3. git config --global user.name "Your Name"
  4. git config --global user.email "[email protected]"
  5. git config --list
  6. git clone https://(USERNAME):(TOKEN)@github.com/OWNER/REPO.git

Undo merged Merge request

@MuhammadQuran17
MuhammadQuran17 / Versioning.md
Last active February 21, 2025 06:46
Packages Versioning in composer.json, PHP

There is a difference between ~ and ^ in Composer, though it might not be immediately obvious in some cases. Let me clarify:

Key Difference Between ~ and ^:

  • ~ (tilde): Allows updates for the last digit specified.
  • ^ (caret): Allows updates for all minor versions within the same major version.

In your example, ~7.3 vs. ^7.3:

  • ~7.3:
@igormukhingmailcom
igormukhingmailcom / STUPID_SYLIUS_ISSUES.md
Last active December 20, 2024 14:25
Symfony/Sylius stupid issues that hard to debug and which may waste too many hours

Symfony/Sylius stupid issues that hard to debug and which may waste too many hours

1. [Doctrine\Common\Persistence\Mapping\MappingException] Class 'Your\SyliusPlugin\Entity\YourEntity' does not exist

When your plugin is AbstractResourceBundle and all your entities should be and actually placed at Model directory, you have that exception (notice ...\Entity\... at exception rather than ..\Model\...) for your Your\SyliusPlugin\Model\YourEntity.php that is weird.

This happens when you accidentally have your mapping file at src/Resources/config/doctrine/YourEntity.orm.xml (without ../model/.. part) rather than src/Resources/config/doctrine/model/YourEntity.orm.xml.

This issue may happen when you convert some of your application code (which use Entity directory) to plugin (which use Model directory).