Pennsylvania has what is called a closed Primary.
Pennsylvania law requires a closed primary, meaning only voters registered as Democrats or Republicans will select nominees to represent their party in the November 7 general election. However, all registered voters, including those registered with a minor political party or no affiliation, may vote on any proposed amendments to the Pennsylvania Constitution that will be on the primary ballot.