21 September 2017

It is actually really simple. If you downgrade packages in ArchLinux you can use "downgrader" for official repositories, but for AUR packages you need to do it manually. The problem I had is that I need <3.0.0 of php-codesniffer. Since php-codesniffer-drupal has that dependency.

Find the right version from AUR git commits, in my case php-codesniffer package. I downloaded snapshot form "Updated to latest stable v2.8.1" commit.
Source code viewer
  1. cd ~/Downloads/
  2. wget https://aur.archlinux.org/cgit/aur.git/snapshot/aur-5fe6c367470d3dda54b33ed9d7009e2146a03a5b.tar.gz
  3. tar -xvzf aur-5fe6c367470d3dda54b33ed9d7009e2146a03a5b.tar.gz
Programming Language: Bash
Just extract the snapshot, cd into it and run "makepkg -i".
Source code viewer
  1. cd aur-5fe6c367470d3dda54b33ed9d7009e2146a03a5b
  2. makepkg -i
Programming Language: Bash
To avoid overwriting the package on update we add it to IgnorePkg in "/etc/pacman.conf".
Source code viewer
  1. # Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
  2. IgnorePkg = phpstorm php-codesniffer
Programming Language: INI