Portugal 10-year non-habitual tax resident scrapped?

Hi, I am, getting close to retiring in about 1 year or so… I was thinking about getting back to Europe and heard about that program a few years back and then I heard they stopped it because the European Union was complaining about it… and how about capital gain on stocks or investments… is it tax free during the 10 years?
I understand that it’s under a tax treaty between the 2 countries, just trying to figure out if I can get a 10 year tax free in Portugal… let me know.

There are many advantages to being a non-habitual tax resident in Portugal:
Benefit from a special personal income tax treatment over a 10-year period
Possibility of enjoying a tax exemption on almost all foreign source income
20% flat rate for certain Portuguese source incomes (from specific professions as well as income from self-employment), as opposed to normal Portuguese income tax rates of up to 48%
No minimum stay requirement
Become part of a white-listed tax environment within the EU
A tax exemption for gifts or inheritance to direct family members
No wealth tax
Free remittance of funds to Portugal

They have made some changes in the last year to deal with the concerns of other EU countries.